diff options
author | Craig Topper <craig.topper@gmail.com> | 2012-05-03 07:12:59 +0000 |
---|---|---|
committer | Craig Topper <craig.topper@gmail.com> | 2012-05-03 07:12:59 +0000 |
commit | 6b28d356c56d656e8e4d23c71de80162bb2eba5e (patch) | |
tree | de4e753e474ece575a7da13fb040fe4bc7811a4f /lib/Target/X86/Utils | |
parent | d99d68bcee8ce91a18c397756c702363e030fd83 (diff) | |
download | external_llvm-6b28d356c56d656e8e4d23c71de80162bb2eba5e.zip external_llvm-6b28d356c56d656e8e4d23c71de80162bb2eba5e.tar.gz external_llvm-6b28d356c56d656e8e4d23c71de80162bb2eba5e.tar.bz2 |
Fix 256-bit vpshuflw and vpshufhw immediate encoding to handle undefs in the lower half correctly. Missed in r155982.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156059 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/X86/Utils')
-rw-r--r-- | lib/Target/X86/Utils/X86ShuffleDecode.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/Target/X86/Utils/X86ShuffleDecode.cpp b/lib/Target/X86/Utils/X86ShuffleDecode.cpp index a1f2424..f0d9467 100644 --- a/lib/Target/X86/Utils/X86ShuffleDecode.cpp +++ b/lib/Target/X86/Utils/X86ShuffleDecode.cpp @@ -82,8 +82,7 @@ void DecodePSHUFMask(EVT VT, unsigned Imm, SmallVectorImpl<int> &ShuffleMask) { void DecodePSHUFHWMask(EVT VT, unsigned Imm, SmallVectorImpl<int> &ShuffleMask) { - unsigned NumLanes = VT.getSizeInBits() / 128; - unsigned NumElts = 8 * NumLanes; + unsigned NumElts = VT.getVectorNumElements(); for (unsigned l = 0; l != NumElts; l += 8) { unsigned NewImm = Imm; @@ -99,8 +98,7 @@ void DecodePSHUFHWMask(EVT VT, unsigned Imm, void DecodePSHUFLWMask(EVT VT, unsigned Imm, SmallVectorImpl<int> &ShuffleMask) { - unsigned NumLanes = VT.getSizeInBits() / 128; - unsigned NumElts = 8 * NumLanes; + unsigned NumElts = VT.getVectorNumElements(); for (unsigned l = 0; l != NumElts; l += 8) { unsigned NewImm = Imm; |