llvm-6502/lib/Transforms/InstCombine
David Majnemer 024d943bca Reorders two transforms that collide with each other
One performs: (X == 13 | X == 14) -> X-13 <u 2
The other: (A == C1 || A == C2) -> (A & ~(C1 ^ C2)) == C1

The problem is that there are certain values of C1 and C2 that
trigger both transforms but the first one blocks out the second,
this generates suboptimal code.

Reordering the transforms should be better in every case and
allows us to do interesting stuff like turn:
  %shr = lshr i32 %X, 4
  %and = and i32 %shr, 15
  %add = add i32 %and, -14
  %tobool = icmp ne i32 %add, 0

into:
  %and = and i32 %X, 240
  %tobool = icmp ne i32 %and, 224


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179493 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-14 21:15:43 +00:00
..
CMakeLists.txt Tidy up a bit. No functional change. 2013-04-05 21:20:12 +00:00
InstCombine.h Remove trailing spaces. 2013-01-14 23:16:36 +00:00
InstCombineAddSub.cpp Tidy up a bit. No functional change. 2013-04-05 21:20:12 +00:00
InstCombineAndOrXor.cpp Reorders two transforms that collide with each other 2013-04-14 21:15:43 +00:00
InstCombineCalls.cpp Tidy up a bit. No functional change. 2013-04-05 21:20:12 +00:00
InstCombineCasts.cpp Make InstCombineCasts.cpp:OptimizeIntToFloatBitCast endian safe. 2013-03-26 15:36:14 +00:00
InstCombineCompares.cpp Simplify (A & ~B) in icmp if A is a power of 2 2013-04-12 17:25:07 +00:00
InstCombineLoadStoreAlloca.cpp Tidy up a bit. No functional change. 2013-04-05 21:20:12 +00:00
InstCombineMulDivRem.cpp Tidy up a bit. No functional change. 2013-04-05 21:20:12 +00:00
InstCombinePHI.cpp Tidy up a bit. No functional change. 2013-04-05 21:20:12 +00:00
InstCombineSelect.cpp Tidy up a bit. No functional change. 2013-04-05 21:20:12 +00:00
InstCombineShifts.cpp Revert r174152. The shift amount may overflow and in that case this transformation is illegal. 2013-02-01 07:59:33 +00:00
InstCombineSimplifyDemanded.cpp Move all of the header files which are involved in modelling the LLVM IR 2013-01-02 11:36:10 +00:00
InstCombineVectorOps.cpp Fix for wrong instcombine on vector insert/extract 2013-04-11 15:10:09 +00:00
InstCombineWorklist.h Remove trailing spaces. 2013-01-14 23:16:36 +00:00
InstructionCombining.cpp Preserve fast-math flags after reassociation and commutation. Update test cases 2013-02-07 01:40:15 +00:00
LLVMBuild.txt LLVMBuild: Remove trailing newline, which irked me. 2011-12-12 19:48:00 +00:00
Makefile