Skip to content

Conversation

@arsenm
Copy link
Contributor

@arsenm arsenm commented Dec 4, 2024

Co-authored-by: Jay Foad [email protected]

Copy link
Contributor Author

arsenm commented Dec 4, 2024

@arsenm arsenm marked this pull request as ready for review December 4, 2024 14:48
@llvmbot
Copy link
Member

llvmbot commented Dec 4, 2024

@llvm/pr-subscribers-backend-amdgpu

Author: Matt Arsenault (arsenm)

Changes

Co-authored-by: Jay Foad <[email protected]>


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 --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> {

@arsenm arsenm force-pushed the users/arsenm/gfx950/cleanup-bitop3-operand-definition branch from cf3e33b to 5e0861e Compare December 4, 2024 16:28
Copy link
Contributor Author

arsenm commented Dec 4, 2024

Merge activity

  • Dec 4, 3:41 PM EST: A user started a stack merge that includes this pull request via Graphite.
  • Dec 4, 3:44 PM EST: Graphite rebased this pull request as part of a merge.
  • Dec 4, 3:47 PM EST: A user merged this pull request with Graphite.

@arsenm arsenm force-pushed the users/arsenm/gfx950/change-bitop3-immarg-to-i32 branch from 3a94843 to be4f050 Compare December 4, 2024 20:42
Base automatically changed from users/arsenm/gfx950/change-bitop3-immarg-to-i32 to main December 4, 2024 20:44
@arsenm arsenm force-pushed the users/arsenm/gfx950/cleanup-bitop3-operand-definition branch from 5e0861e to 3fa4ced Compare December 4, 2024 20:44
@arsenm arsenm merged commit 431581b into main Dec 4, 2024
4 of 6 checks passed
@arsenm arsenm deleted the users/arsenm/gfx950/cleanup-bitop3-operand-definition branch December 4, 2024 20:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants