llvm-project/llvm/lib/Transforms/InstCombine
Simon Pilgrim 6dd8fab443 [InstCombine] Folding of shifts by the sum of positive values
This patch introduces the combine:

(C1 shift (A add C2)) -> ((C1 shift C2) shift A)
iff A and C2 are both positive

If both A and C2 are know to be positive then we can safely split into 2 shifts, permitting the folding of the Inner shift.

Fix for the spec benchmark case mentioned by @nadav on PR15141 (assuming we can prove that the inputs as positive).

Differential Revision: https://reviews.llvm.org/D26000

llvm-svn: 285696
2016-11-01 15:40:30 +00:00
..
CMakeLists.txt Use ADDITIONAL_HEADER_DIRS in all LLVM CMake projects. 2015-02-11 03:28:02 +00:00
InstCombineAddSub.cpp [InstCombine] use m_APInt to allow sub with constant folds for splat vectors 2016-10-14 16:31:54 +00:00
InstCombineAndOrXor.cpp [InstCombine] add helper function for folding {and,or,xor} (cast X), C ; NFCI 2016-09-12 00:16:23 +00:00
InstCombineCalls.cpp [InstCombine][SSE4a] Fix assertion failure in the insertq/insertqi combining logic. 2016-09-07 12:47:53 +00:00
InstCombineCasts.cpp [InstCombine] clean up commonCastTransforms; NFC 2016-10-26 14:52:35 +00:00
InstCombineCompares.cpp [InstCombine] Ensure that truncated int types are legal. 2016-10-25 20:11:47 +00:00
InstCombineInternal.h [InstCombine] handle simple vector integer constants in IsFreeToInvert 2016-10-27 17:30:50 +00:00
InstCombineLoadStoreAlloca.cpp Analysis: Move llvm::getConstantRangeFromMetadata to IR library. 2016-10-21 19:59:26 +00:00
InstCombineMulDivRem.cpp [InstCombine] Teach the udiv folding logic how to handle constant expressions. 2016-09-26 12:07:23 +00:00
InstCombinePHI.cpp Use the range variant of find/find_if instead of unpacking begin/end 2016-08-12 03:55:06 +00:00
InstCombineSelect.cpp [InstCombine] re-use bitcasted compare operands in selects (PR28001) 2016-10-29 15:22:04 +00:00
InstCombineShifts.cpp [InstCombine] Folding of shifts by the sum of positive values 2016-11-01 15:40:30 +00:00
InstCombineSimplifyDemanded.cpp [InstCombine] Fixed bug introduced in r282237 2016-09-26 13:18:59 +00:00
InstCombineVectorOps.cpp [InstCombine] Fix for PR29124: reduce insertelements to shufflevector 2016-09-23 09:14:08 +00:00
InstructionCombining.cpp [InstCombine] Fix constexpr issue in select combining 2016-10-12 10:20:15 +00:00
LLVMBuild.txt Update libdeps since TLI was moved from Target to Analysis in r226078. 2015-01-15 05:21:00 +00:00