[llvm] [AMDGPU] SIFoldOperands check that shrunk op is valid (PR #156298)
David Stuttard via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 2 00:41:21 PDT 2025
================
@@ -868,6 +868,8 @@ bool SIFoldOperandsImpl::tryAddToFoldList(
// Make sure to get the 32-bit version of the commuted opcode.
unsigned MaybeCommutedOpc = MI->getOpcode();
Op32 = AMDGPU::getVOPe32(MaybeCommutedOpc);
+ if (TII->pseudoToMCOpcode(Op32) == -1)
----------------
dstutt wrote:
I think the difference here is that it is trying to find the VOPe32 variant - which might not exist, even if the commuteOpcode did. (Part of the shrink).
https://github.com/llvm/llvm-project/pull/156298
More information about the llvm-commits
mailing list