1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-27 05:53:07 +01:00
llvm-mirror/lib/Transforms/InstCombine
Simon Pilgrim c31bcce147 [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
2015-08-07 18:22:50 +00:00
..
CMakeLists.txt Use ADDITIONAL_HEADER_DIRS in all LLVM CMake projects. 2015-02-11 03:28:02 +00:00
InstCombineAddSub.cpp [InstCombine] Generalize sub of selects optimization to all BinaryOperators 2015-07-14 22:39:23 +00:00
InstCombineAndOrXor.cpp [ConstantRange] Split makeICmpRegion in two. 2015-03-18 00:41:24 +00:00
InstCombineCalls.cpp [InstCombine] Fix SSE2/AVX2 vector logical shift by constant 2015-08-07 18:22:50 +00:00
InstCombineCasts.cpp Reapply r237539 with a fix for the Chromium build. 2015-05-20 18:41:25 +00:00
InstCombineCompares.cpp [InstSimplify] Fold away ord/uno fcmps when nnan is present. 2015-07-10 14:02:02 +00:00
InstCombineInternal.h [InstCombine] Employ AliasAnalysis in FindAvailableLoadedValue 2015-07-10 06:55:49 +00:00
InstCombineLoadStoreAlloca.cpp [InstCombine] Actually combine AA metadata when replacing one load with another 2015-07-10 22:30:17 +00:00
InstCombineMulDivRem.cpp Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
InstCombinePHI.cpp don't repeat function names in comments; NFC 2015-06-23 23:05:08 +00:00
InstCombineSelect.cpp [InstCombine, InstSimplify] Move xforms from Combine to Simplify 2015-06-06 22:40:21 +00:00
InstCombineShifts.cpp Convert PHI getIncomingValue() to foreach over incoming_values(). NFC. 2015-05-12 20:05:31 +00:00
InstCombineSimplifyDemanded.cpp Reapply r237539 with a fix for the Chromium build. 2015-05-20 18:41:25 +00:00
InstCombineVectorOps.cpp [InstSimplify] Teach InstSimplify how to simplify extractelement 2015-07-13 01:15:53 +00:00
InstructionCombining.cpp Convert a bunch of loops to foreach. NFC. 2015-08-06 20:22:46 +00:00
LLVMBuild.txt Update libdeps since TLI was moved from Target to Analysis in r226078. 2015-01-15 05:21:00 +00:00
Makefile