llvm-6502/lib/Transforms/Scalar
Chris Lattner f523d06816 Be more careful about the order we put stuff onto the worklist. This allow us to
collapse this:
bool %le(int %A, int %B) {
        %c1 = setgt int %A, %B
        %tmp = select bool %c1, int 1, int 0
        %c2 = setlt int %A, %B
        %result = select bool %c2, int -1, int %tmp
        %c3 = setle int %result, 0
        ret bool %c3
}

into:

bool %le(int %A, int %B) {
        %c3 = setle int %A, %B          ; <bool> [#uses=1]
        ret bool %c3
}

which is handy, because the Java FE makes these sequences all over the place.

This is tested as: test/Regression/Transforms/InstCombine/JavaCompare.ll


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14086 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-09 05:08:07 +00:00
..
ADCE.cpp Do not mark instructions in unreachable sections of the function as live. 2004-05-04 17:00:46 +00:00
BasicBlockPlacement.cpp Remove obsolete comment. Unreachable blocks will automatically be left at the 2004-02-11 05:20:50 +00:00
ConstantProp.cpp Changes to fix up the inst_iterator to pass to boost iterator checks. This 2004-04-27 15:13:33 +00:00
CorrelatedExprs.cpp Remove use of the ConstantHandling interfaces 2004-01-12 19:12:50 +00:00
DCE.cpp Changes to fix up the inst_iterator to pass to boost iterator checks. This 2004-04-27 15:13:33 +00:00
DecomposeMultiDimRefs.cpp Finegrainify namespacification 2004-01-09 06:02:20 +00:00
GCSE.cpp Add support for replacement of formal arguments with simpler expressions. 2004-05-23 21:19:55 +00:00
IndVarSimplify.cpp Move the scev expansion code into this pass, where it belongs. There is 2004-04-23 21:29:48 +00:00
InstructionCombining.cpp Be more careful about the order we put stuff onto the worklist. This allow us to 2004-06-09 05:08:07 +00:00
LICM.cpp Adjust to the changes in the AliasSetTracker interface 2004-05-23 21:20:19 +00:00
LoopUnroll.cpp Fix a nasty bug that caused us to unroll EXTREMELY large loops due to overflow 2004-05-13 20:43:31 +00:00
LoopUnswitch.cpp Initial checkin of a simple loop unswitching pass. It still needs work, 2004-04-19 18:07:02 +00:00
LowerGC.cpp Spelling people's names right is kinda important 2004-05-23 21:27:29 +00:00
Makefile Added LLVM copyright notice to Makefiles. 2003-10-20 22:26:57 +00:00
PiNodeInsertion.cpp Finegrainify namespacification 2004-01-09 06:02:20 +00:00
PRE.cpp Finegrainify namespacification 2004-01-09 06:02:20 +00:00
Reassociate.cpp Finegrainify namespacification 2004-01-09 06:02:20 +00:00
ScalarReplAggregates.cpp Support getelementptr instructions which use uint's to index into structure 2004-04-05 01:30:19 +00:00
SCCP.cpp Add SCCP support for constant folding calls, implementing: 2004-04-13 19:43:54 +00:00
SimplifyCFG.cpp Finegrainify namespacification 2004-01-09 06:02:20 +00:00
SymbolStripping.cpp Make this pass simply invoke SymbolTable::strip(). 2004-05-25 08:51:25 +00:00
TailDuplication.cpp Remove unused header file. 2004-05-25 08:51:36 +00:00
TailRecursionElimination.cpp Adjust to the new BasicBlock ctor, which requires a function parameter 2004-02-04 03:58:28 +00:00