llvm-6502/lib
Nate Begeman 1cbf3abbb8 Next round of PPC CR optimizations. For the following code:
int %bar(float %a, float %b, float %c, float %d) {
entry:
    %tmp.1 = setlt float %a, %d
    %tmp.2 = setlt float %b, %d
    %or = or bool %tmp.1, %tmp.2
    %tmp.3 = setgt float %c, %d
    %tmp.4 = or bool %or, %tmp.3
    %tmp.5 = and bool %tmp.4, true
    %retval = cast bool %tmp.5 to int
    ret int %retval
}

We now emit:

_bar:
.LBB_bar_0:     ; entry
        fcmpu cr0, f1, f4
        fcmpu cr1, f2, f4
        cror 0, 0, 4
        fcmpu cr1, f3, f4
        cror 28, 0, 5
        mfcr r2
        rlwinm r3, r2, 29, 31, 31
        blr

Instead of:

_bar:
.LBB_bar_0:     ; entry
        fcmpu cr7, f1, f4
        mfcr r2
        rlwinm r2, r2, 29, 31, 31
        fcmpu cr7, f2, f4
        mfcr r3
        rlwinm r3, r3, 29, 31, 31
        or r2, r2, r3
        fcmpu cr7, f3, f4
        mfcr r3
        rlwinm r3, r3, 30, 31, 31
        or r3, r2, r3
        blr


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21321 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-18 07:48:09 +00:00
..
Analysis Fix a crash analyzing MultiSource/Benchmarks/MallocBench/gs 2005-04-12 03:59:27 +00:00
Archive
AsmParser
Bytecode
CodeGen Fold setcc of MVT::i1 operands into logical operations 2005-04-18 04:48:12 +00:00
Debugger
ExecutionEngine Add support for targets that require stubs for external functions. 2005-04-18 01:44:27 +00:00
Linker
Support
System Eliminate tabs 2005-04-11 03:44:22 +00:00
Target Next round of PPC CR optimizations. For the following code: 2005-04-18 07:48:09 +00:00
Transforms silence a bogus warning 2005-04-18 05:26:21 +00:00
VMCore add an argument to allow avoiding deleting phi nodes. 2005-04-12 18:52:14 +00:00
Makefile