summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorSimon Pilgrim <llvm-dev@redking.me.uk>2016-03-03 21:55:01 +0000
committerSimon Pilgrim <llvm-dev@redking.me.uk>2016-03-03 21:55:01 +0000
commitf33cb61471c0feb31aa97f52273ec5c3799b5ac9 (patch)
tree4ebe3d2a4c172a34dd9b7426e91cf852dea41eee /llvm/lib
parent05920b14c8892d8183eb6df0cae8659d9d1dd9e3 (diff)
downloadbcm5719-llvm-f33cb61471c0feb31aa97f52273ec5c3799b5ac9.tar.gz
bcm5719-llvm-f33cb61471c0feb31aa97f52273ec5c3799b5ac9.zip
[X86][AVX512BW] Fixed 512-bit PSHUFB shuffle mask decode and added combine test.
PSHUFB decoder was assuming that input was 128 or 256-bit vector only. llvm-svn: 262661
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Target/X86/Utils/X86ShuffleDecode.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/Target/X86/Utils/X86ShuffleDecode.cpp b/llvm/lib/Target/X86/Utils/X86ShuffleDecode.cpp
index e2e3f8cf0ea..5c999261afb 100644
--- a/llvm/lib/Target/X86/Utils/X86ShuffleDecode.cpp
+++ b/llvm/lib/Target/X86/Utils/X86ShuffleDecode.cpp
@@ -314,9 +314,9 @@ void DecodePSHUFBMask(ArrayRef<uint64_t> RawMask,
ShuffleMask.push_back(M);
continue;
}
- // For AVX vectors with 32 bytes the base of the shuffle is the half of
- // the vector we're inside.
- int Base = i < 16 ? 0 : 16;
+ // For 256/512-bit vectors the base of the shuffle is the 128-bit
+ // subvector we're inside.
+ int Base = (i / 16) * 16;
// If the high bit (7) of the byte is set, the element is zeroed.
if (M & (1 << 7))
ShuffleMask.push_back(SM_SentinelZero);
OpenPOWER on IntegriCloud