Skip to content

Commit 60c4bb1

Browse files
committed
add combining condition for InsIdx >= NumEls
1 parent 9336465 commit 60c4bb1

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
@@ -2695,7 +2695,7 @@ bool VectorCombine::foldInsExtVectorToShuffle(Instruction &I) {
26952695
return false;
26962696

26972697
unsigned NumElts = VecTy->getNumElements();
2698-
if (ExtIdx >= NumElts)
2698+
if (ExtIdx >= NumElts || InsIdx >= NumElts)
26992699
return false;
27002700

27012701
SmallVector<int> Mask(NumElts, 0);

0 commit comments

Comments
 (0)