llvm-6502/lib/Target
Chris Lattner 4dd4a2d278 If the false value for a select_cc is really simple (has no inputs), evaluate
it in the block.  This codegens:

int %test(bool %c) {
        %retval = select bool %c, int 17, int 1
        ret int %retval
}

as:

_test:
        rlwinm r2, r3, 0, 31, 31
        li r2, 17
        cmpwi cr0, r3, 0
        bne .LBB_test_2 ;
.LBB_test_1:    ;
        li r2, 1
.LBB_test_2:    ;
        or r3, r2, r2
        blr

instead of:

_test:
        rlwinm r2, r3, 0, 31, 31
        li r2, 17
        li r4, 1
        cmpwi cr0, r3, 0
        bne .LBB_test_2 ;
.LBB_test_1:    ;
        or r2, r4, r4
.LBB_test_2:    ;
        or r3, r2, r2
        blr

... which is one fewer instruction.  The savings are more significant for
global address and constantfp nodes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22946 91177308-0d34-0410-b5e6-96231b3b80d8
2005-08-21 17:41:11 +00:00
..
Alpha Put register classes in namespaces 2005-08-19 18:50:46 +00:00
CBackend Culling out use of unions for converting FP to bits and vice versa. 2005-08-17 19:34:49 +00:00
IA64 reenable collapse of loadimm+AND -> dep.z (thanks guys) 2005-08-21 15:43:53 +00:00
PowerPC If the false value for a select_cc is really simple (has no inputs), evaluate 2005-08-21 17:41:11 +00:00
Skeleton put reg classes into namespace 2005-08-19 18:53:43 +00:00
Sparc Split RegisterClass 'Methods' into MethodProtos and MethodBodies 2005-08-19 19:13:20 +00:00
SparcV8 Split RegisterClass 'Methods' into MethodProtos and MethodBodies 2005-08-19 19:13:20 +00:00
SparcV9 Put register classes into namespaces 2005-08-19 18:51:57 +00:00
X86 Split RegisterClass 'Methods' into MethodProtos and MethodBodies 2005-08-19 19:13:20 +00:00
Makefile Implement the --enable-targets= feature of the configure script. The make 2005-04-22 17:20:11 +00:00
MRegisterInfo.cpp Convert tabs to spaces 2005-04-22 17:54:37 +00:00
Target.td Split RegisterClass 'Methods' into MethodProtos and MethodBodies 2005-08-19 19:13:20 +00:00
TargetData.cpp Update to use the new MathExtras.h support for log2 computation. 2005-08-02 19:26:06 +00:00
TargetFrameInfo.cpp Eliminate all remaining tabs and trailing spaces. 2005-07-27 06:12:32 +00:00
TargetInstrInfo.cpp Convert tabs to spaces 2005-04-22 17:54:37 +00:00
TargetMachine.cpp Remove the X86 and PowerPC Simple instruction selectors; their time has 2005-08-18 23:53:15 +00:00
TargetMachineRegistry.cpp Remove trailing whitespace 2005-04-21 22:55:34 +00:00
TargetSchedInfo.cpp Convert tabs to spaces 2005-04-22 17:54:37 +00:00
TargetSubtarget.cpp Eliminate all remaining tabs and trailing spaces. 2005-07-27 06:12:32 +00:00