llvm-6502/lib/Transforms
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
..
Hello eliminate RegisterOpt. It does the same thing as RegisterPass. 2006-08-27 22:42:52 +00:00
Instrumentation For PR786: 2006-11-02 20:25:50 +00:00
IPO second patch to fix PR992/993. 2006-11-09 23:36:08 +00:00
Scalar implement InstCombine/and-compare.ll:test1. This compiles: 2006-11-14 06:06:06 +00:00
Utils Remove redundant <cmath>. 2006-11-08 19:16:44 +00:00
ExprTypeConvert.cpp For PR950: 2006-11-08 06:47:33 +00:00
LevelRaise.cpp eliminate RegisterOpt. It does the same thing as RegisterPass. 2006-08-27 22:42:52 +00:00
Makefile DONT_BUILD_RELINKED is gone and implied by BUILD_ARCHIVE now 2005-10-24 02:26:13 +00:00
TransformInternals.cpp For PR950: 2006-10-20 07:07:24 +00:00
TransformInternals.h For PR950: 2006-10-20 07:07:24 +00:00