llvm/lib
Chris Lattner 706aa9685a Fold:
// (X != 0) | (Y != 0) -> (X|Y != 0)
        // (X == 0) & (Y == 0) -> (X|Y == 0)

Compiling this:

int %bar(int %a, int %b) {
        entry:
        %tmp.1 = setne int %a, 0
        %tmp.2 = setne int %b, 0
        %tmp.3 = or bool %tmp.1, %tmp.2
        %retval = cast bool %tmp.3 to int
        ret int %retval
        }

to this:

_bar:
        or r2, r3, r4
        addic r3, r2, -1
        subfe r3, r3, r2
        blr

instead of:

_bar:
        addic r2, r3, -1
        subfe r2, r2, r3
        addic r3, r4, -1
        subfe r3, r3, r4
        or r3, r2, r3
        blr


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21316 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-18 03:59:53 +00:00
..
Analysis Fix a crash analyzing MultiSource/Benchmarks/MallocBench/gs 2005-04-12 03:59:27 +00:00
Archive Implement an isBytecodeArchive method to determine if an archive contains 2005-02-26 22:00:32 +00:00
AsmParser don't crash in some bad cases. 2005-03-23 01:29:26 +00:00
Bytecode This mega patch converts us from using Function::a{iterator|begin|end} to 2005-03-15 04:54:21 +00:00
CodeGen Fold: 2005-04-18 03:59:53 +00:00
Debugger
ExecutionEngine Add support for targets that require stubs for external functions. 2005-04-18 01:44:27 +00:00
Linker fix some 80 column violations 2005-03-15 23:03:34 +00:00
Support Timers SHOULD NOT record the time taken to count the bytes allocated in the heap! 2005-03-22 03:20:38 +00:00
System Eliminate tabs 2005-04-11 03:44:22 +00:00
Target Change codegen for setcc to read the bit directly out of the condition 2005-04-18 02:43:24 +00:00
Transforms a new simple pass, which will be extended to be more useful in the future. 2005-04-15 19:28:32 +00:00
VMCore add an argument to allow avoiding deleting phi nodes. 2005-04-12 18:52:14 +00:00
Makefile