Skip to content

Commit 18bc03b

Browse files
committed
[RISCV] Remove unneeded AddedComplexity from Xqcibi patterns. NFCI
We don't have any tests that show why this AddedComplexity is needed. ImmLeafs are automatically ranked higher than register operands so there is no ambgiuity with the base ISA here. If there's some reason I'm missing, please explain and I'll add a comment.
1 parent 3ab95e4 commit 18bc03b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llvm/lib/Target/RISCV/RISCVInstrInfoXqci.td

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1417,7 +1417,7 @@ def : PatGprNoX0GprNoX0<sshlsat, QC_SHLSAT>;
14171417

14181418
/// Branches
14191419

1420-
let Predicates = [HasVendorXqcibi, IsRV32], AddedComplexity = 2 in {
1420+
let Predicates = [HasVendorXqcibi, IsRV32] in {
14211421
def : BcciPat<SETEQ, QC_BEQI, simm5nonzero>;
14221422
def : BcciPat<SETNE, QC_BNEI, simm5nonzero>;
14231423
def : BcciPat<SETLT, QC_BLTI, simm5nonzero>;
@@ -1445,7 +1445,7 @@ def : SelectQCbi<SETLT, simm16nonzero, Select_GPRNoX0_Using_CC_SImm16NonZero_QC>
14451445
def : SelectQCbi<SETGE, simm16nonzero, Select_GPRNoX0_Using_CC_SImm16NonZero_QC>;
14461446
def : SelectQCbi<SETULT, uimm16nonzero, Select_GPRNoX0_Using_CC_UImm16NonZero_QC>;
14471447
def : SelectQCbi<SETUGE, uimm16nonzero, Select_GPRNoX0_Using_CC_UImm16NonZero_QC>;
1448-
} // let Predicates = [HasVendorXqcibi, IsRV32], AddedComplexity = 2
1448+
} // let Predicates = [HasVendorXqcibi, IsRV32]
14491449

14501450
let Predicates = [HasVendorXqcibm, IsRV32] in {
14511451
def : Pat<(sext_inreg (i32 GPR:$rs1), i1), (QC_EXT GPR:$rs1, 1, 0)>;

0 commit comments

Comments
 (0)