[llvm] [RISCV][NFC] Remove unused methods of tuimm5 (PR #79680)

via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 26 22:55:31 PST 2024


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-backend-risc-v

Author: Jianjian Guan (jacquesguan)

<details>
<summary>Changes</summary>

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.

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


1 Files Affected:

- (modified) llvm/lib/Target/RISCV/RISCVInstrInfoZvk.td (+1-11) 


``````````diff
diff --git a/llvm/lib/Target/RISCV/RISCVInstrInfoZvk.td b/llvm/lib/Target/RISCV/RISCVInstrInfoZvk.td
index 7c21fb4bcc1ea64..b4bd074b710179a 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

``````````

</details>


https://github.com/llvm/llvm-project/pull/79680


More information about the llvm-commits mailing list