aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms/Utils/Local.cpp
diff options
context:
space:
mode:
authorSimon Pilgrim <llvm-dev@redking.me.uk>2015-08-07 18:22:50 +0000
committerSimon Pilgrim <llvm-dev@redking.me.uk>2015-08-07 18:22:50 +0000
commit3815c16bf86c44afa3bf4bd255b730330c218c33 (patch)
tree847179c61aca11a0f9849df04a579dc80d81b6be /llvm/lib/Transforms/Utils/Local.cpp
parent855ea0f71af3c0646faa436508daadb47834d716 (diff)
downloadllvm-3815c16bf86c44afa3bf4bd255b730330c218c33.zip
llvm-3815c16bf86c44afa3bf4bd255b730330c218c33.tar.gz
llvm-3815c16bf86c44afa3bf4bd255b730330c218c33.tar.bz2
[InstCombine] Fix SSE2/AVX2 vector logical shift by constant
This patch fixes the sse2/avx2 vector shift by constant instcombine call to correctly deal with the fact that the shift amount is formed from the entire lower 64-bit and not just the lowest element as it currently assumes. e.g. %1 = tail call <4 x i32> @llvm.x86.sse2.psrl.d(<4 x i32> %v, <4 x i32> <i32 15, i32 15, i32 15, i32 15>) In this case, (V)PSRLD doesn't perform a lshr by 15 but in fact attempts to shift by 64424509455 ((15 << 32) | 15) - giving a zero result. In addition, this review also recognizes shift-by-zero from a ConstantAggregateZero type (PR23821). Differential Revision: http://reviews.llvm.org/D11760 llvm-svn: 244341
Diffstat (limited to 'llvm/lib/Transforms/Utils/Local.cpp')
0 files changed, 0 insertions, 0 deletions