Skip to content
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

[AMDGPU] Fix AMDGPUISD::TRAP description #117453

Merged
merged 1 commit into from
Nov 24, 2024

Conversation

s-barannikov
Copy link
Contributor

Glue operand is only present if there are variadic register operands, which makes it optional.
Also, change the number of fixed operands to 1 (the trap ID).

* the node always has one *fixed* argument, which is the trap id
* glue operand is only present if there are variadic register operands
@llvmbot
Copy link
Member

llvmbot commented Nov 24, 2024

@llvm/pr-subscribers-backend-amdgpu

Author: Sergei Barannikov (s-barannikov)

Changes

Glue operand is only present if there are variadic register operands, which makes it optional.
Also, change the number of fixed operands to 1 (the trap ID).


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

1 Files Affected:

  • (modified) llvm/lib/Target/AMDGPU/AMDGPUInstrInfo.td (+2-2)
diff --git a/llvm/lib/Target/AMDGPU/AMDGPUInstrInfo.td b/llvm/lib/Target/AMDGPU/AMDGPUInstrInfo.td
index 702f6e67c55271..bec294a945d2fe 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPUInstrInfo.td
+++ b/llvm/lib/Target/AMDGPU/AMDGPUInstrInfo.td
@@ -100,8 +100,8 @@ def AMDGPUtc_return_chain: SDNode<"AMDGPUISD::TC_RETURN_CHAIN",
 >;
 
 def AMDGPUtrap : SDNode<"AMDGPUISD::TRAP",
-  SDTypeProfile<0, -1, [SDTCisVT<0, i16>]>,
-    [SDNPHasChain, SDNPVariadic, SDNPSideEffect, SDNPInGlue]
+  SDTypeProfile<0, 1, [SDTCisVT<0, i16>]>,
+    [SDNPHasChain, SDNPVariadic, SDNPSideEffect, SDNPOptInGlue]
 >;
 
 def AMDGPUconstdata_ptr : SDNode<

@s-barannikov s-barannikov merged commit 8d65073 into llvm:main Nov 24, 2024
10 checks passed
@s-barannikov s-barannikov deleted the sdag/amdgpu-trap branch November 24, 2024 06:25
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.

3 participants