1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-25 20:23:11 +01:00
llvm-mirror/lib
Chris Lattner d8ac4da793 implement some more logical compares with constants, so that:
int foo1(int x, int y) {
  int t1 = x >= 0;
  int t2 = y >= 0;
  return t1 & t2;
}
int foo2(int x, int y) {
  int t1 = x == -1;
  int t2 = y == -1;
  return t1 & t2;
}

produces:

_foo1:
        or r2, r4, r3
        srwi r2, r2, 31
        xori r3, r2, 1
        blr
_foo2:
        and r2, r4, r3
        addic r2, r2, 1
        li r2, 0
        addze r3, r2
        blr

instead of:

_foo1:
        srwi r2, r4, 31
        xori r2, r2, 1
        srwi r3, r3, 31
        xori r3, r3, 1
        and r3, r2, r3
        blr
_foo2:
        addic r2, r4, 1
        li r2, 0
        addze r2, r2
        addic r3, r3, 1
        li r3, 0
        addze r3, r3
        and r3, r2, r3
        blr

llvm-svn: 21547
2005-04-25 21:20:28 +00:00
..
Analysis Correctly handle global-argument aliases induced in main 2005-04-25 19:16:31 +00:00
AsmParser * Remove trailing whitespace 2005-04-21 21:10:11 +00:00
Bytecode Convert tabs to spaces 2005-04-22 04:01:18 +00:00
CodeGen implement some more logical compares with constants, so that: 2005-04-25 21:20:28 +00:00
Debugger Remove trailing whitespace 2005-04-21 22:36:52 +00:00
ExecutionEngine Convert tabs to spaces 2005-04-22 04:08:30 +00:00
Linker Remove trailing whitespace 2005-04-21 22:55:34 +00:00
Support * Order #includes as per style guide 2005-04-22 19:13:22 +00:00
System Silence gcc-4.0.0 warnings. 2005-04-22 17:56:01 +00:00
Target Shut GCC 4.0 up about classes that have virtual functions but a non-virtual 2005-04-25 02:55:55 +00:00
Transforms Lots of changes based on review and new functionality: 2005-04-25 21:11:48 +00:00
VMCore Make dominates(A,B) work with post dominators. Patch contributed by 2005-04-25 20:50:33 +00:00
Makefile Add the Linker library 2004-11-14 21:54:41 +00:00