Skip to content

Commit 4b931b5

Browse files
committed
fixup! fixup! [VecorCombine] Avoid inserting freeze when scalarizing extend-extract if all extracts would lead to UB on poison.
1 parent 78259eb commit 4b931b5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

llvm/lib/Transforms/Vectorize/VectorCombine.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2034,7 +2034,8 @@ bool VectorCombine::scalarizeExtExtract(Instruction &I) {
20342034
if (!LastExtract || LastExtract->comesBefore(Extract))
20352035
LastExtract = Extract;
20362036
}
2037-
// Check execution is guaranteed from extend to last extract.
2037+
// Check that the last extract (and hence all previous ones) are guaranteed
2038+
// to execute if Ext executes.
20382039
AllExtractsTriggerUB =
20392040
AllExtractsTriggerUB &&
20402041
all_of(make_range(Ext->getIterator(), LastExtract->getIterator()),

0 commit comments

Comments
 (0)