llvm-6502/lib/Transforms/InstCombine
David Majnemer b1b738e036 InstCombine: (icmp eq B, 0) | (icmp ult A, B) -> (icmp ule A, B-1)
This transform allows us to turn IR that looks like:
  %1 = icmp eq i64 %b, 0
  %2 = icmp ult i64 %a, %b
  %3 = or i1 %1, %2
  ret i1 %3

into:
  %0 = add i64 %b, -1
  %1 = icmp uge i64 %0, %a
  ret i1 %1

which means we go from lowering:
        cmpq    %rsi, %rdi
        setb    %cl
        testq   %rsi, %rsi
        sete    %al
        orb     %cl, %al
        ret

to lowering:
        decq    %rsi
        cmpq    %rdi, %rsi
        setae   %al
        ret


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185677 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-05 00:31:17 +00:00
..
CMakeLists.txt
InstCombine.h Reapply with r182909 with a fix to the calculation of the new indices for 2013-05-31 00:59:42 +00:00
InstCombineAddSub.cpp In InstCombine{AddSub,MulDivRem} convert APFloat.isFiniteNonZero() && !APFloat.isDenormal => APFloat.isNormal. 2013-06-26 23:17:31 +00:00
InstCombineAndOrXor.cpp InstCombine: (icmp eq B, 0) | (icmp ult A, B) -> (icmp ule A, B-1) 2013-07-05 00:31:17 +00:00
InstCombineCalls.cpp Fix using arg_end() - arg_begin() instead of arg_size() 2013-06-28 00:25:40 +00:00
InstCombineCasts.cpp
InstCombineCompares.cpp InstCombine: FoldGEPICmp shouldn't change sign of base pointer comparison 2013-06-29 10:28:04 +00:00
InstCombineLoadStoreAlloca.cpp
InstCombineMulDivRem.cpp InstCombine: Reimplementation of visitUDivOperand 2013-07-04 21:17:49 +00:00
InstCombinePHI.cpp
InstCombineSelect.cpp InstCombine: Also turn selects fed by an and into arithmetic when the types don't match. 2013-06-29 21:17:04 +00:00
InstCombineShifts.cpp
InstCombineSimplifyDemanded.cpp
InstCombineVectorOps.cpp Delete dead safety check. 2013-06-03 23:15:20 +00:00
InstCombineWorklist.h
InstructionCombining.cpp Use SmallVectorImpl::iterator/const_iterator instead of SmallVector to avoid specifying the vector size. 2013-07-04 01:31:24 +00:00
LLVMBuild.txt
Makefile