llvm-6502/lib/Transforms/Scalar
Chris Lattner 97f37a439c Fix a problem that Nate noticed that boils down to an over conservative check
in the code that does "select C, (X+Y), (X-Y) --> (X+(select C, Y, (-Y)))".
We now compile this loop:

LBB1_1: ; no_exit
        add r6, r2, r3
        subf r3, r2, r3
        cmpwi cr0, r2, 0
        addi r7, r5, 4
        lwz r2, 0(r5)
        addi r4, r4, 1
        blt cr0, LBB1_4 ; no_exit
LBB1_3: ; no_exit
        mr r3, r6
LBB1_4: ; no_exit
        cmpwi cr0, r4, 16
        mr r5, r7
        bne cr0, LBB1_1 ; no_exit

into this instead:

LBB1_1: ; no_exit
        srawi r6, r2, 31
        add r2, r2, r6
        xor r6, r2, r6
        addi r7, r5, 4
        lwz r2, 0(r5)
        addi r4, r4, 1
        add r3, r3, r6
        cmpwi cr0, r4, 16
        mr r5, r7
        bne cr0, LBB1_1 ; no_exit


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26356 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-24 18:05:58 +00:00
..
ADCE.cpp Make iostream #inclusion explicit 2006-01-22 23:32:06 +00:00
BasicBlockPlacement.cpp
CondPropagate.cpp
ConstantProp.cpp
CorrelatedExprs.cpp Improve compatibility with VC2005, patch by Morten Ofstad! 2006-01-26 20:41:32 +00:00
DCE.cpp
DeadStoreElimination.cpp
GCSE.cpp Switch these to using ETForest instead of DominatorSet to compute itself. 2006-01-11 05:10:20 +00:00
IndVarSimplify.cpp
InstructionCombining.cpp Fix a problem that Nate noticed that boils down to an over conservative check 2006-02-24 18:05:58 +00:00
LICM.cpp Make iostream #inclusion explicit 2006-01-22 23:32:06 +00:00
LoopStrengthReduce.cpp Use SCEVExpander::InsertCastOfTo instead of our own code. This reduces 2006-02-04 09:52:43 +00:00
LoopUnroll.cpp Make iostream #inclusion explicit 2006-01-22 23:32:06 +00:00
LoopUnswitch.cpp Fix Regression/Transforms/LoopUnswitch/2006-02-22-UnswitchCrash.ll, which 2006-02-22 23:55:00 +00:00
LowerGC.cpp FunctionPass's cannot do IPO things. 2006-01-14 19:30:35 +00:00
LowerPacked.cpp Lowerpacked and SCCP support for the insertelement operation. 2006-01-17 20:06:55 +00:00
Makefile
Reassociate.cpp Make iostream #inclusion explicit 2006-01-22 23:32:06 +00:00
Reg2Mem.cpp
ScalarReplAggregates.cpp Fix Regression/Transforms/ScalarRepl/2006-01-24-IllegalUnionPromoteCrash.ll 2006-01-24 19:36:27 +00:00
SCCP.cpp Implement some more interesting select sccp cases. This implements: 2006-02-08 02:38:11 +00:00
SimplifyCFG.cpp
TailDuplication.cpp Make iostream #inclusion explicit 2006-01-22 23:32:06 +00:00
TailRecursionElimination.cpp