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
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
InstCombineSimplifyDemanded.cpp
InstCombineVectorOps.cpp Fix for wrong instcombine on vector insert/extract 2013-04-11 15:10:09 +00:00
InstCombineWorklist.h
InstructionCombining.cpp
LLVMBuild.txt
Makefile