llvm/lib/Transforms
Simon Pilgrim 547527cc83 [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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244341 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-07 18:22:50 +00:00
..
Hello Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
InstCombine [InstCombine] Fix SSE2/AVX2 vector logical shift by constant 2015-08-07 18:22:50 +00:00
Instrumentation Rename inst_range() to instructions() for consistency. NFC 2015-08-06 19:10:45 +00:00
IPO [PM/AA] Hoist the interface for BasicAA into a header file. 2015-08-06 07:33:15 +00:00
ObjCARC [PM/AA] Extract the ModRef enums from the AliasAnalysis class in 2015-07-22 23:15:57 +00:00
Scalar Convert a bunch of loops to foreach. NFC. 2015-08-06 20:22:46 +00:00
Utils ValueMapper: Resolve uniquing cycles more aggressively 2015-08-07 00:44:55 +00:00
Vectorize wrap OptSize and MinSize attributes for easier and consistent access (NFCI) 2015-08-04 15:49:57 +00:00
CMakeLists.txt
LLVMBuild.txt
Makefile