1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-23 21:13:02 +02:00
llvm-mirror/lib
Chris Lattner 616335f272 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.

llvm-svn: 31727
2006-11-14 06:06:06 +00:00
..
Analysis A shim over other AA impls to catch incorrect uses 2006-11-14 05:21:04 +00:00
AsmParser Initialize some pointers to quiet the compiler (when doing build_gcc 2006-11-12 11:10:39 +00:00
Bytecode Discard code that supported old bytecode formats. This makes the Bytecode 2006-11-14 04:47:22 +00:00
CodeGen Matches MachineInstr changes. 2006-11-13 23:36:35 +00:00
Debugger For PR786: 2006-11-02 20:25:50 +00:00
ExecutionEngine if lazy compilation is disabled, print an error message and abort if 2006-11-09 19:32:13 +00:00
Linker Remvoe a do-nothing else block. 2006-11-11 20:27:49 +00:00
Support Remove redundant <cmath>. 2006-11-08 19:16:44 +00:00
System Unbreak VC++ build. 2006-11-05 19:31:28 +00:00
Target lower "X = seteq Y, Z" to '(shr (ctlz (xor Y, Z)), 5)' instead of 2006-11-14 05:28:08 +00:00
Transforms implement InstCombine/and-compare.ll:test1. This compiles: 2006-11-14 06:06:06 +00:00
VMCore Implement removeDeadPasses(). 2006-11-14 03:05:08 +00:00
Makefile