Skip to content

Commit

Permalink
Fix a bug spotted in the review
Browse files Browse the repository at this point in the history
  • Loading branch information
s-barannikov committed Oct 9, 2023
1 parent 028bd14 commit d47572d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion llvm/lib/Target/Sparc/SparcInstrInfo.td
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,7 @@ def calltarget : Operand<i32> {
}

def simm13Op : Operand<iPTR> {
let OperandType = "OPERAND_IMMEDIATE";
let DecoderMethod = "DecodeSIMM13";
let EncoderMethod = "getSImm13OpValue";
}
Expand Down Expand Up @@ -835,7 +836,7 @@ let Defs = [ICC], hasPostISelHook = true in
let Uses = [ICC] in
defm SUBC : F3_12np <"subx", 0b001100>;

def : Pat<(SPcmpicc i32:$lhs, i32:$rhs), (SUBCCri $lhs, $rhs)>;
def : Pat<(SPcmpicc i32:$lhs, i32:$rhs), (SUBCCrr $lhs, $rhs)>;
def : Pat<(SPcmpicc i32:$lhs, (i32 simm13:$rhs)), (SUBCCri $lhs, imm:$rhs)>;

// Section B.18 - Multiply Instructions, p. 113
Expand Down

0 comments on commit d47572d

Please sign in to comment.