llvm-6502/lib/Transforms/InstCombine
Suyog Sarda c9ea25fc51 This patch implements optimization as mentioned in PR19753: Optimize comparisons with "ashr/lshr exact" of a constanst.
It handles the errors which were seen in PR19958 where wrong code was being emitted due to earlier patch.
Added code for lshr as well as non-exact right shifts.

It implements : 
(icmp eq/ne (ashr/lshr const2, A), const1)" ->
(icmp eq/ne A, Log2(const2/const1)) ->
(icmp eq/ne A, Log2(const2) - Log2(const1))

Differential Revision: http://reviews.llvm.org/D4068
 


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@213678 91177308-0d34-0410-b5e6-96231b3b80d8
2014-07-22 19:19:36 +00:00
..
CMakeLists.txt Tidy up a bit. No functional change. 2013-04-05 21:20:12 +00:00
InstCombine.h This patch implements optimization as mentioned in PR19753: Optimize comparisons with "ashr/lshr exact" of a constanst. 2014-07-22 19:19:36 +00:00
InstCombineAddSub.cpp Fix Typo (first commit to test commit access) 2014-07-17 06:09:34 +00:00
InstCombineAndOrXor.cpp Added InstCombine transform for pattern "(A & B) ^ (A ^ B) -> (A | B)" 2014-07-22 18:30:54 +00:00
InstCombineCalls.cpp InstCombine: Strength reduce sadd.with.overflow into a regular nsw add if we can prove that it cannot overflow. 2014-07-04 10:22:21 +00:00
InstCombineCasts.cpp Fix comment in InstCombiner::visitAddrSpaceCast. 2014-07-16 01:34:21 +00:00
InstCombineCompares.cpp This patch implements optimization as mentioned in PR19753: Optimize comparisons with "ashr/lshr exact" of a constanst. 2014-07-22 19:19:36 +00:00
InstCombineLoadStoreAlloca.cpp Use pointer type cast helpers. 2014-07-14 17:24:38 +00:00
InstCombineMulDivRem.cpp InstCombine: Optimize x/INT_MIN to x==INT_MIN 2014-07-02 06:42:13 +00:00
InstCombinePHI.cpp [C++] Use 'nullptr'. Transforms edition. 2014-04-25 05:29:35 +00:00
InstCombineSelect.cpp This removes TODO added in http://reviews.llvm.org/D3658 2014-06-12 14:06:00 +00:00
InstCombineShifts.cpp fixed typo in comment 2014-07-22 04:57:06 +00:00
InstCombineSimplifyDemanded.cpp Rename ComputeMaskedBits to computeKnownBits. "Masked" has been 2014-05-14 21:14:37 +00:00
InstCombineVectorOps.cpp fixed some typos 2014-07-07 22:13:58 +00:00
InstCombineWorklist.h [C++] Use 'nullptr'. 2014-04-28 04:05:08 +00:00
InstructionCombining.cpp Revert "[C++11] Add predecessors(BasicBlock *) / successors(BasicBlock *) iterator ranges." 2014-07-21 17:06:51 +00:00
LLVMBuild.txt LLVMBuild: Remove trailing newline, which irked me. 2011-12-12 19:48:00 +00:00
Makefile