[llvm] [VectorCombine] scalarizeLoadExtract - don't create scalar loads if any extract is waiting to be erased (PR #129375)
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Sat Mar 1 04:34:56 PST 2025
================
@@ -1579,6 +1579,11 @@ bool VectorCombine::scalarizeLoadExtract(Instruction &I) {
if (!UI || UI->getParent() != LI->getParent())
return false;
+ // If any extract is waiting to be erased, then bail out as this will
+ // distort the cost calculation and possibly lead to infinite loops.
+ if (isInstructionTriviallyDead(UI))
----------------
RKSimon wrote:
yes - as we're just dealing with extractelement instructions
https://github.com/llvm/llvm-project/pull/129375
More information about the llvm-commits
mailing list