llvm-6502/lib
Chris Lattner dea9528f7f When lowering SELECT_CC, see if the input is a lowered SETCC. If so, fold
the two operations together.  This allows us to compile this:

void %two(int %a, int* %b) {
        %tmp.2 = seteq int %a, 0
        %tmp.0.0 = select bool %tmp.2, int 10, int 20
        store int %tmp.0.0, int* %b
        ret void
}

into:

two:
        save -96, %o6, %o6
        or %g0, 20, %l0
        or %g0, 10, %l1
        subcc %i0, 0, %l2
        be .LBBtwo_2    ! entry
        nop
.LBBtwo_1:      ! entry
        or %g0, %l0, %l1
.LBBtwo_2:      ! entry
        st %l1, [%i1]
        restore %g0, %g0, %g0
        retl
        nop

instead of:

two:
        save -96, %o6, %o6
        sethi 0, %l0
        or %g0, 1, %l1
        or %g0, 20, %l2
        or %g0, 10, %l3
        subcc %i0, 0, %l4
        be .LBBtwo_2    ! entry
        nop
.LBBtwo_1:      ! entry
        or %g0, %l0, %l1
.LBBtwo_2:      ! entry
        subcc %l1, 0, %l0
        bne .LBBtwo_4   ! entry
        nop
.LBBtwo_3:      ! entry
        or %g0, %l2, %l3
.LBBtwo_4:      ! entry
        st %l3, [%i1]
        restore %g0, %g0, %g0
        retl
        nop


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25806 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-30 04:34:44 +00:00
..
Analysis Add explicit iostream #includes 2006-01-22 23:19:18 +00:00
Archive more C++ daintiness 2005-12-26 14:31:26 +00:00
AsmParser regenerate 2006-01-25 22:27:16 +00:00
Bytecode Fix auto-upgrade of intrinsics to work properly with both assembly and 2006-01-27 11:49:27 +00:00
CodeGen don't insert an and node if it isn't needed here, this can prevent folding 2006-01-30 04:22:28 +00:00
Debugger dum de dum 2005-12-26 10:24:15 +00:00
ExecutionEngine Add #include of <iostream> 2006-01-22 23:41:42 +00:00
Linker Rename method 2006-01-24 04:14:29 +00:00
Support dynamically allocate plugin space as needed 2006-01-26 19:38:58 +00:00
System Add AddSymbol() method to DynamicLibrary to work around Windows limitation 2006-01-30 04:33:51 +00:00
Target When lowering SELECT_CC, see if the input is a lowered SETCC. If so, fold 2006-01-30 04:34:44 +00:00
Transforms Improve compatibility with VC2005, patch by Morten Ofstad! 2006-01-26 20:41:32 +00:00
VMCore Fix auto-upgrade of intrinsics to work properly with both assembly and 2006-01-27 11:49:27 +00:00
Makefile Add the Linker library 2004-11-14 21:54:41 +00:00