forked from OSchip/llvm-project
Added check to avoid generating extract subvector beyond the end of the vector when normalizing vector shuffles.
llvm-svn: 59900
This commit is contained in:
parent
cdf25053ee
commit
2967480f54
|
@ -2423,7 +2423,8 @@ void SelectionDAGLowering::visitShuffleVector(User &I) {
|
|||
StartIdx[Input] = 0;
|
||||
} else {
|
||||
StartIdx[Input] = (MinRange[Input]/MaskNumElts)*MaskNumElts;
|
||||
if (MaxRange[Input] - StartIdx[Input] < MaskNumElts)
|
||||
if (MaxRange[Input] - StartIdx[Input] < MaskNumElts &&
|
||||
StartIdx[Input] + MaskNumElts < SrcNumElts)
|
||||
RangeUse[Input] = 1; // Extract from a multiple of the mask length.
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue