llvm-6502/lib/Transforms/Scalar
Chris Lattner 9c2328e5a9 implement InstCombine/and-compare.ll:test1. This compiles:
typedef struct { unsigned prefix : 4; unsigned code : 4; unsigned unsigned_p : 4; } tree_common;
int foo(tree_common *a, tree_common *b) { return a->code == b->code; }

into:

_foo:
        movl 4(%esp), %eax
        movl 8(%esp), %ecx
        movl (%eax), %eax
        xorl (%ecx), %eax
        # TRUNCATE movb %al, %al
        shrb $4, %al
        testb %al, %al
        sete %al
        movzbl %al, %eax
        ret

instead of:

_foo:
        movl 8(%esp), %eax
        movb (%eax), %al
        shrb $4, %al
        movl 4(%esp), %ecx
        movb (%ecx), %cl
        shrb $4, %cl
        cmpb %al, %cl
        sete %al
        movzbl %al, %eax
        ret

saving one cycle by eliminating a shift.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31727 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-14 06:06:06 +00:00
..
ADCE.cpp eliminate RegisterOpt. It does the same thing as RegisterPass. 2006-08-27 22:42:52 +00:00
BasicBlockPlacement.cpp eliminate RegisterOpt. It does the same thing as RegisterPass. 2006-08-27 22:42:52 +00:00
CondPropagate.cpp There can be more than one PHINode at the start of the block. 2006-11-01 23:04:45 +00:00
ConstantProp.cpp eliminate RegisterOpt. It does the same thing as RegisterPass. 2006-08-27 22:42:52 +00:00
CorrelatedExprs.cpp remove dead code 2006-11-03 01:34:58 +00:00
DCE.cpp eliminate RegisterOpt. It does the same thing as RegisterPass. 2006-08-27 22:42:52 +00:00
DeadStoreElimination.cpp eliminate RegisterOpt. It does the same thing as RegisterPass. 2006-08-27 22:42:52 +00:00
GCSE.cpp eliminate RegisterOpt. It does the same thing as RegisterPass. 2006-08-27 22:42:52 +00:00
IndVarSimplify.cpp Fix Transforms/IndVarsSimplify/2006-09-20-LFTR-Crash.ll 2006-09-21 05:12:20 +00:00
InstructionCombining.cpp implement InstCombine/and-compare.ll:test1. This compiles: 2006-11-14 06:06:06 +00:00
LICM.cpp An sinkable instruction may exist with uses, if those uses are in dead blocks. 2006-09-12 19:17:09 +00:00
LoopStrengthReduce.cpp For PR786: 2006-11-02 20:25:50 +00:00
LoopUnroll.cpp For PR786: 2006-11-02 20:25:50 +00:00
LoopUnswitch.cpp For PR786: 2006-11-02 20:25:50 +00:00
LowerGC.cpp For PR950: 2006-10-20 07:07:24 +00:00
LowerPacked.cpp For PR950: 2006-10-20 07:07:24 +00:00
Makefile
PredicateSimplifier.cpp Unbreak VC++ build. 2006-11-05 19:31:28 +00:00
Reassociate.cpp For PR950: 2006-11-02 01:53:59 +00:00
Reg2Mem.cpp eliminate RegisterOpt. It does the same thing as RegisterPass. 2006-08-27 22:42:52 +00:00
ScalarReplAggregates.cpp For PR950: 2006-11-08 06:47:33 +00:00
SCCP.cpp For PR786: 2006-11-02 20:25:50 +00:00
SimplifyCFG.cpp eliminate RegisterOpt. It does the same thing as RegisterPass. 2006-08-27 22:42:52 +00:00
TailDuplication.cpp set DEBUG_TYPE right 2006-09-27 04:58:23 +00:00
TailRecursionElimination.cpp For PR786: 2006-11-02 20:25:50 +00:00