[llvm-branch-commits] [llvm] AMDGPU: Simplify definition of bitop3 operand. NFC. (PR #118648)
via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Wed Dec 4 06:48:42 PST 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-backend-amdgpu
Author: Matt Arsenault (arsenm)
<details>
<summary>Changes</summary>
Co-authored-by: Jay Foad <jay.foad@<!-- -->amd.com>
---
Full diff: https://github.com/llvm/llvm-project/pull/118648.diff
2 Files Affected:
- (modified) llvm/lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp (-17)
- (modified) llvm/lib/Target/AMDGPU/SIInstrInfo.td (+2-1)
``````````diff
diff --git a/llvm/lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp b/llvm/lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp
index 37a8c7fef7d0af..ed956a1f755c06 100644
--- a/llvm/lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp
+++ b/llvm/lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp
@@ -1920,9 +1920,6 @@ class AMDGPUAsmParser : public MCTargetAsmParser {
ParseStatus parseEndpgm(OperandVector &Operands);
ParseStatus parseVOPD(OperandVector &Operands);
-
- ParseStatus parseBitOp3(OperandVector &Operands);
- AMDGPUOperand::Ptr defaultBitOp3() const;
};
} // end anonymous namespace
@@ -9796,20 +9793,6 @@ ParseStatus AMDGPUAsmParser::parseEndpgm(OperandVector &Operands) {
bool AMDGPUOperand::isEndpgm() const { return isImmTy(ImmTyEndpgm); }
-//===----------------------------------------------------------------------===//
-// BITOP3
-//===----------------------------------------------------------------------===//
-
-ParseStatus AMDGPUAsmParser::parseBitOp3(OperandVector &Operands) {
- ParseStatus Res =
- parseIntWithPrefix("bitop3", Operands, AMDGPUOperand::ImmTyBitOp3);
- return Res;
-}
-
-AMDGPUOperand::Ptr AMDGPUAsmParser::defaultBitOp3() const {
- return AMDGPUOperand::CreateImm(this, 0, SMLoc(), AMDGPUOperand::ImmTyBitOp3);
-}
-
//===----------------------------------------------------------------------===//
// Split Barrier
//===----------------------------------------------------------------------===//
diff --git a/llvm/lib/Target/AMDGPU/SIInstrInfo.td b/llvm/lib/Target/AMDGPU/SIInstrInfo.td
index fc8c12a674e466..7bc6db4cec1065 100644
--- a/llvm/lib/Target/AMDGPU/SIInstrInfo.td
+++ b/llvm/lib/Target/AMDGPU/SIInstrInfo.td
@@ -1271,7 +1271,8 @@ def ByteSel : NamedIntOperand<"byte_sel"> {
let Validator = "isUInt<2>";
}
-def BitOp3 : CustomOperand<i32, 1, "BitOp3">;
+let PrintMethod = "printBitOp3" in
+def BitOp3 : NamedIntOperand<"bitop3">;
def bitop3_0 : DefaultOperand<BitOp3, 0>;
class KImmFPOperand<ValueType vt> : ImmOperand<vt> {
``````````
</details>
https://github.com/llvm/llvm-project/pull/118648
More information about the llvm-branch-commits
mailing list