We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1224a74 commit 3b75045Copy full SHA for 3b75045
llvm/lib/Transforms/Vectorize/VectorCombine.cpp
@@ -3076,7 +3076,7 @@ bool VectorCombine::foldInsExtVectorToShuffle(Instruction &I) {
3076
3077
unsigned NumDstElts = DstVecTy->getNumElements();
3078
unsigned NumSrcElts = SrcVecTy->getNumElements();
3079
- if (InsIdx >= NumDstElts || NumDstElts == 1)
+ if (InsIdx >= NumDstElts || ExtIdx >= NumSrcElts || NumDstElts == 1)
3080
return false;
3081
3082
// Insertion into poison is a cheaper single operand shuffle.
0 commit comments