[llvm] WebAssembly: Don't duplicate implicit CALL operands in LowerCallResults (PR #225069)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 21 04:50:03 PDT 2026
llvmorg-github-actions[bot] wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-backend-webassembly
Author: Matt Arsenault (arsenm)
<details>
<summary>Changes</summary>
When recombining the CALL_PARAMS/CALL_RESULTS pseudo-pair into a real CALL,
LowerCallResults copied CallParams.uses() onto the new instruction. uses()
includes the implicit operands (implicit-def $arguments and the implicit
$sp32/$sp64 uses), which the freshly created CALL already carries. This
resulted in a duplicated implicit-def of $arguments. This avoids a future
verifier error.
Co-authored-by: Claude (Claude-Opus-4.8) <noreply@<!-- -->anthropic.com>
---
Full diff: https://github.com/llvm/llvm-project/pull/225069.diff
1 Files Affected:
- (modified) llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp (+2-1)
``````````diff
diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp b/llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp
index ba702afbe3262..1ecd232782679 100644
--- a/llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp
+++ b/llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp
@@ -867,7 +867,8 @@ LowerCallResults(MachineInstr &CallResults, DebugLoc DL, MachineBasicBlock *BB,
}
}
- for (auto Use : CallParams.uses())
+ // Avoid duplicating the implicit operands.
+ for (auto Use : CallParams.explicit_uses())
MIB.add(Use);
BB->insert(CallResults.getIterator(), MIB);
``````````
</details>
https://github.com/llvm/llvm-project/pull/225069
More information about the llvm-commits
mailing list