Skip to content

[SPARC][IAS][NFC] Rename CBCOND -> CPBCOND #138402

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
May 12, 2025

Conversation

koachan
Copy link
Contributor

@koachan koachan commented May 3, 2025

This is in prep for OSA2011 instruction definitions, which has a CBCond
instruction family.

koachan added 2 commits May 3, 2025 20:51
Created using spr 1.3.5
@llvmbot
Copy link
Member

llvmbot commented May 3, 2025

@llvm/pr-subscribers-backend-sparc

Author: Koakuma (koachan)

Changes

This is in prep for OSA2011 instruction definitions, which has a CBCond
instruction family.


Full diff: https://github.com/llvm/llvm-project/pull/138402.diff

3 Files Affected:

  • (modified) llvm/lib/Target/Sparc/MCTargetDesc/SparcInstPrinter.cpp (+2-2)
  • (modified) llvm/lib/Target/Sparc/SparcInstrAliases.td (+2-2)
  • (modified) llvm/lib/Target/Sparc/SparcInstrInfo.td (+2-2)
diff --git a/llvm/lib/Target/Sparc/MCTargetDesc/SparcInstPrinter.cpp b/llvm/lib/Target/Sparc/MCTargetDesc/SparcInstPrinter.cpp
index f2a61c95fefb5..42f3b9d3c4ce9 100644
--- a/llvm/lib/Target/Sparc/MCTargetDesc/SparcInstPrinter.cpp
+++ b/llvm/lib/Target/Sparc/MCTargetDesc/SparcInstPrinter.cpp
@@ -192,8 +192,8 @@ void SparcInstPrinter::printCCOperand(const MCInst *MI, int opNum,
     // Make sure CC is a fp conditional flag.
     CC = (CC < SPCC::FCC_BEGIN) ? (CC + SPCC::FCC_BEGIN) : CC;
     break;
-  case SP::CBCOND:
-  case SP::CBCONDA:
+  case SP::CPBCOND:
+  case SP::CPBCONDA:
     // Make sure CC is a cp conditional flag.
     CC = (CC < SPCC::CPCC_BEGIN) ? (CC + SPCC::CPCC_BEGIN) : CC;
     break;
diff --git a/llvm/lib/Target/Sparc/SparcInstrAliases.td b/llvm/lib/Target/Sparc/SparcInstrAliases.td
index bc57ddbb5682f..590395c16965b 100644
--- a/llvm/lib/Target/Sparc/SparcInstrAliases.td
+++ b/llvm/lib/Target/Sparc/SparcInstrAliases.td
@@ -286,11 +286,11 @@ multiclass cp_cond_alias<string cond, int condVal> {
 
   // cb<cond> $imm
   def : InstAlias<!strconcat(!strconcat("cb", cond), " $imm"),
-                  (CBCOND brtarget:$imm, condVal), 0>;
+                  (CPBCOND brtarget:$imm, condVal), 0>;
 
   // cb<cond>,a $imm
   def : InstAlias<!strconcat(!strconcat("cb", cond), ",a $imm"),
-                  (CBCONDA brtarget:$imm, condVal), 0>;
+                  (CPBCONDA brtarget:$imm, condVal), 0>;
 }
 
 // Instruction aliases for register conditional branches and moves.
diff --git a/llvm/lib/Target/Sparc/SparcInstrInfo.td b/llvm/lib/Target/Sparc/SparcInstrInfo.td
index eb6485eaa3d98..057eafd734e71 100644
--- a/llvm/lib/Target/Sparc/SparcInstrInfo.td
+++ b/llvm/lib/Target/Sparc/SparcInstrInfo.td
@@ -1028,10 +1028,10 @@ class CPBranchSPA<dag ins, string asmstr, list<dag> pattern>
 
 } // let isBranch = 1, isTerminator = 1, hasDelaySlot = 1
 
-def CBCOND  : CPBranchSP<(ins brtarget:$imm22, CCOp:$cond),
+def CPBCOND  : CPBranchSP<(ins brtarget:$imm22, CCOp:$cond),
                           "cb$cond $imm22",
                           [(SPbrfcc bb:$imm22, imm:$cond)]>;
-def CBCONDA : CPBranchSPA<(ins brtarget:$imm22, CCOp:$cond),
+def CPBCONDA : CPBranchSPA<(ins brtarget:$imm22, CCOp:$cond),
                            "cb$cond,a $imm22", []>;
 
 // Section B.24 - Call and Link Instruction, p. 125

@koachan koachan requested review from brad0, rorth and s-barannikov May 3, 2025 13:56
Copy link
Contributor

@s-barannikov s-barannikov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@koachan koachan requested a review from s-barannikov May 11, 2025 14:11
koachan added 2 commits May 12, 2025 13:27
Created using spr 1.3.5

[skip ci]
Created using spr 1.3.5
@koachan koachan changed the base branch from users/koachan/spr/main.sparciasnfc-rename-cbcond-cpbcond to main May 12, 2025 06:28
@koachan koachan merged commit 87b4cac into main May 12, 2025
8 of 15 checks passed
@koachan koachan deleted the users/koachan/spr/sparciasnfc-rename-cbcond-cpbcond branch May 12, 2025 06:28
llvm-sync bot pushed a commit to arm/arm-toolchain that referenced this pull request May 12, 2025
This is in prep for OSA2011 instruction definitions, which has a CBCond
instruction family.

Reviewers: rorth, s-barannikov, brad0

Reviewed By: s-barannikov

Pull Request: llvm/llvm-project#138402
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants