diff options
author | Nikita Popov <nikita.ppv@gmail.com> | 2019-09-07 12:13:44 +0000 |
---|---|---|
committer | Nikita Popov <nikita.ppv@gmail.com> | 2019-09-07 12:13:44 +0000 |
commit | 314893cc4ba05e65da4be26afb21b2fb50eab7b3 (patch) | |
tree | 1d7f4216e5a0ca77ee445418be1ba324591996f1 /llvm/lib/Target/X86 | |
parent | fdc6977ff3c0cb6c729c38c86f96e1281cb3171c (diff) | |
download | bcm5719-llvm-314893cc4ba05e65da4be26afb21b2fb50eab7b3.tar.gz bcm5719-llvm-314893cc4ba05e65da4be26afb21b2fb50eab7b3.zip |
[X86] Fix pshuflw formation from repeated shuffle mask (PR43230)
Fix for https://bugs.llvm.org/show_bug.cgi?id=43230.
When creating PSHUFLW from a repeated shuffle mask, we have to apply
the checks to the repeated mask, not the original one. For the test
case from PR43230 the inspected part of the original mask is all undef.
Differential Revision: https://reviews.llvm.org/D67314
llvm-svn: 371307
Diffstat (limited to 'llvm/lib/Target/X86')
-rw-r--r-- | llvm/lib/Target/X86/X86ISelLowering.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Target/X86/X86ISelLowering.cpp b/llvm/lib/Target/X86/X86ISelLowering.cpp index 235d31bef8c..d3229296ba7 100644 --- a/llvm/lib/Target/X86/X86ISelLowering.cpp +++ b/llvm/lib/Target/X86/X86ISelLowering.cpp @@ -32041,8 +32041,8 @@ static bool matchUnaryPermuteShuffle(MVT MaskVT, ArrayRef<int> Mask, if (!ContainsZeros && AllowIntDomain && MaskScalarSizeInBits == 16) { SmallVector<int, 4> RepeatedMask; if (is128BitLaneRepeatedShuffleMask(MaskEltVT, Mask, RepeatedMask)) { - ArrayRef<int> LoMask(Mask.data() + 0, 4); - ArrayRef<int> HiMask(Mask.data() + 4, 4); + ArrayRef<int> LoMask(RepeatedMask.data() + 0, 4); + ArrayRef<int> HiMask(RepeatedMask.data() + 4, 4); // PSHUFLW: permute lower 4 elements only. if (isUndefOrInRange(LoMask, 0, 4) && |