Skip to content

Conversation

@nhaehnle
Copy link
Collaborator

This verifier check will complain if there aren't enough implicit
operands -- so it doesn't allow those operands, it requires them.

This verifier check will complain if there aren't enough implicit
operands -- so it doesn't *allow* those operands, it *requires* them.

commit-id:73b0c366
@nhaehnle
Copy link
Collaborator Author

(no review expected)

@llvmbot
Copy link
Member

llvmbot commented Nov 24, 2025

@llvm/pr-subscribers-backend-amdgpu

Author: Nicolai Hähnle (nhaehnle)

Changes

This verifier check will complain if there aren't enough implicit
operands -- so it doesn't allow those operands, it requires them.


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

1 Files Affected:

  • (modified) llvm/lib/Target/AMDGPU/SIInstrInfo.cpp (+4-3)
diff --git a/llvm/lib/Target/AMDGPU/SIInstrInfo.cpp b/llvm/lib/Target/AMDGPU/SIInstrInfo.cpp
index a7333e3373f38..7504452dc777f 100644
--- a/llvm/lib/Target/AMDGPU/SIInstrInfo.cpp
+++ b/llvm/lib/Target/AMDGPU/SIInstrInfo.cpp
@@ -5518,9 +5518,10 @@ bool SIInstrInfo::verifyInstruction(const MachineInstr &MI,
         Desc.getNumOperands() + Desc.implicit_uses().size();
     const unsigned NumImplicitOps = IsDst ? 2 : 1;
 
-    // Allow additional implicit operands. This allows a fixup done by the post
-    // RA scheduler where the main implicit operand is killed and implicit-defs
-    // are added for sub-registers that remain live after this instruction.
+    // Require additional implicit operands. This allows a fixup done by the
+    // post RA scheduler where the main implicit operand is killed and
+    // implicit-defs are added for sub-registers that remain live after this
+    // instruction.
     if (MI.getNumOperands() < StaticNumOps + NumImplicitOps) {
       ErrInfo = "missing implicit register operands";
       return false;

@nhaehnle nhaehnle enabled auto-merge (squash) November 24, 2025 20:24
@nhaehnle nhaehnle merged commit f581d8a into main Nov 24, 2025
11 of 12 checks passed
@nhaehnle nhaehnle deleted the users/nhaehnle/spr/main/73b0c366 branch November 24, 2025 20:54
aadeshps-mcw pushed a commit to aadeshps-mcw/llvm-project that referenced this pull request Nov 26, 2025
This verifier check will complain if there aren't enough implicit
operands -- so it doesn't *allow* those operands, it *requires* them.
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