mirror of
https://github.com/RPCS3/llvm.git
synced 2025-02-24 04:32:09 +00:00
Added check to avoid generating extract subvector beyond the end of the vector when normalizing vector shuffles.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59900 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
dccb025768
commit
6cce3dae90
@ -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…
x
Reference in New Issue
Block a user