-
Notifications
You must be signed in to change notification settings - Fork 15.3k
AMDGPU: Simplify definition of bitop3 operand. NFC. #118648
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
arsenm
merged 1 commit into
main
from
users/arsenm/gfx950/cleanup-bitop3-operand-definition
Dec 4, 2024
Merged
AMDGPU: Simplify definition of bitop3 operand. NFC. #118648
arsenm
merged 1 commit into
main
from
users/arsenm/gfx950/cleanup-bitop3-operand-definition
Dec 4, 2024
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Contributor
Author
This stack of pull requests is managed by Graphite. Learn more about stacking. |
Member
|
@llvm/pr-subscribers-backend-amdgpu Author: Matt Arsenault (arsenm) ChangesCo-authored-by: Jay Foad <[email protected]> Full diff: https://github.com/llvm/llvm-project/pull/118648.diff 2 Files Affected:
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> {
|
shiltian
approved these changes
Dec 4, 2024
cf3e33b to
5e0861e
Compare
Contributor
Author
3a94843 to
be4f050
Compare
Base automatically changed from
users/arsenm/gfx950/change-bitop3-immarg-to-i32
to
main
December 4, 2024 20:44
Co-authored-by: Jay Foad <[email protected]>
5e0861e to
3fa4ced
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.

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