[llvm] 9cd8884 - [RISCV] Remove unused MCOperandPredicate from simm12_lsb00000. NFC

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 27 16:46:06 PDT 2025


Author: Craig Topper
Date: 2025-03-27T16:45:58-07:00
New Revision: 9cd88847b57a43c1f862e54abce445a2f2f8f46f

URL: https://github.com/llvm/llvm-project/commit/9cd88847b57a43c1f862e54abce445a2f2f8f46f
DIFF: https://github.com/llvm/llvm-project/commit/9cd88847b57a43c1f862e54abce445a2f2f8f46f.diff

LOG: [RISCV] Remove unused MCOperandPredicate from simm12_lsb00000. NFC

I don't think the use of isBareSymbolRef() was correct since we
don't have any relocations associated with this instruction type.

Added: 
    

Modified: 
    llvm/lib/Target/RISCV/RISCVInstrInfoZicbo.td

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Target/RISCV/RISCVInstrInfoZicbo.td b/llvm/lib/Target/RISCV/RISCVInstrInfoZicbo.td
index 56b68e324de26..56c870414596b 100644
--- a/llvm/lib/Target/RISCV/RISCVInstrInfoZicbo.td
+++ b/llvm/lib/Target/RISCV/RISCVInstrInfoZicbo.td
@@ -21,12 +21,6 @@ def simm12_lsb00000 : RISCVOp,
   let ParserMatchClass = SImmAsmOperand<12, "Lsb00000">;
   let EncoderMethod = "getImmOpValue";
   let DecoderMethod = "decodeSImmOperand<12>";
-  let MCOperandPredicate = [{
-    int64_t Imm;
-    if (MCOp.evaluateAsConstantImm(Imm))
-      return isShiftedInt<7, 5>(Imm);
-    return MCOp.isBareSymbolRef();
-  }];
   let OperandType = "OPERAND_SIMM12_LSB00000";
 }
 


        


More information about the llvm-commits mailing list