[llvm] 70c3e30 - [RISCV][NFC] Remove unused methods of tuimm5 (#79680)

via llvm-commits llvm-commits at lists.llvm.org
Sun Jan 28 17:54:38 PST 2024


Author: Jianjian Guan
Date: 2024-01-29T09:54:34+08:00
New Revision: 70c3e30e01bd123e87824e36b6e38a39451ac28d

URL: https://github.com/llvm/llvm-project/commit/70c3e30e01bd123e87824e36b6e38a39451ac28d
DIFF: https://github.com/llvm/llvm-project/commit/70c3e30e01bd123e87824e36b6e38a39451ac28d.diff

LOG: [RISCV][NFC] Remove unused methods of tuimm5 (#79680)

Since we only use tuimm5 in patterns, it doesn't need those methods for
MC layer. And there is not `getUImmOpValue` defination now, leave those
methods is confusing.

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Target/RISCV/RISCVInstrInfoZvk.td b/llvm/lib/Target/RISCV/RISCVInstrInfoZvk.td
index 7c21fb4bcc1ea6..b4bd074b710179 100644
--- a/llvm/lib/Target/RISCV/RISCVInstrInfoZvk.td
+++ b/llvm/lib/Target/RISCV/RISCVInstrInfoZvk.td
@@ -15,17 +15,7 @@
 // Operand and SDNode transformation definitions.
 //===----------------------------------------------------------------------===//
 
-def tuimm5 : Operand<XLenVT>, TImmLeaf<XLenVT, [{return isUInt<5>(Imm);}]> {
-  let ParserMatchClass = UImmAsmOperand<5>;
-  let EncoderMethod = "getUImmOpValue";
-  let DecoderMethod = "decodeUImmOperand<5>";
-  let MCOperandPredicate = [{
-    int64_t UImm;
-    if (MCOp.evaluateAsConstantImm(UImm))
-      return isUInt<5>(UImm);
-    return MCOp.isBareSymbolRef();
-  }];
-}
+def tuimm5 : RISCVOp, TImmLeaf<XLenVT, [{return isUInt<5>(Imm);}]>;
 
 //===----------------------------------------------------------------------===//
 // Instruction class templates


        


More information about the llvm-commits mailing list