Skip to content

Commit 52a6511

Browse files
committed
Just use use_empty as we're only handling ExtractElementInst - isInstructionTriviallyDead is only needed for more complex general cases
1 parent ba9ba19 commit 52a6511

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/lib/Transforms/Vectorize/VectorCombine.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1581,7 +1581,7 @@ bool VectorCombine::scalarizeLoadExtract(Instruction &I) {
15811581

15821582
// If any extract is waiting to be erased, then bail out as this will
15831583
// distort the cost calculation and possibly lead to infinite loops.
1584-
if (isInstructionTriviallyDead(UI))
1584+
if (UI->use_empty())
15851585
return false;
15861586

15871587
// Check if any instruction between the load and the extract may modify

0 commit comments

Comments
 (0)