llvm-6502/lib/Target
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
..
Alpha fix calls 2005-04-14 17:34:20 +00:00
CBackend Fix the 3 regressions last night, due to my buggy patch from yesterday. 2005-03-19 17:35:11 +00:00
IA64 print negative 64 bit immediates as negative numbers, makes things a little 2005-04-14 10:08:01 +00:00
PowerPC Next round of PPC CR optimizations. For the following code: 2005-04-18 07:48:09 +00:00
Skeleton ignore generated files 2004-11-21 00:01:54 +00:00
Sparc This mega patch converts us from using Function::a{iterator|begin|end} to 2005-03-15 04:54:21 +00:00
SparcV8 This mega patch converts us from using Function::a{iterator|begin|end} to 2005-03-15 04:54:21 +00:00
SparcV9 Fix CodeGen/SparcV9/2005-05-09-GEP-Crash.ll a crash on some specfp program 2005-04-09 06:27:14 +00:00
X86 Make pattern isel default for ppc 2005-04-15 22:12:16 +00:00
Makefile build the IA64 target as a .so for now 2005-03-17 18:29:04 +00:00
MRegisterInfo.cpp Move destructor out of line to avoid vtable emission in every file that includes the header. Thanks to sabre. 2004-10-27 06:00:53 +00:00
Target.td Add some bits that can be set for instructions. 2005-01-02 02:27:48 +00:00
TargetData.cpp add a StructLayout::getElementContainingOffset method. 2005-03-13 19:04:41 +00:00
TargetFrameInfo.cpp Fix compilation errors with VS 2005, patch contributed by Aaron Gray. 2005-02-17 21:40:27 +00:00
TargetInstrInfo.cpp Finegrainify namespacification 2005-01-19 06:53:34 +00:00
TargetMachine.cpp Make pattern isel default for ppc 2005-04-15 22:12:16 +00:00
TargetMachineRegistry.cpp Implement TargetRegistrationListener 2004-07-11 06:03:21 +00:00
TargetSchedInfo.cpp Improve compatiblity with HPUX on Itanium, patch by Duraid Madina 2005-01-16 01:31:31 +00:00