llvm-6502/lib
Chris Lattner 5cdcc58d51 Add some folds for == and != comparisons. This allows us to
codegen this loop in stepanov:

no_exit.i:              ; preds = %entry, %no_exit.i, %then.i, %_Z5checkd.exit
        %i.0.0 = phi int [ 0, %entry ], [ %i.0.0, %no_exit.i ], [ %inc.0, %_Z5checkd.exit ], [ %inc.012, %then.i ]              ; <int> [#uses=3]
        %indvar = phi uint [ %indvar.next, %no_exit.i ], [ 0, %entry ], [ 0, %then.i ], [ 0, %_Z5checkd.exit ]          ; <uint> [#uses=3]
        %result_addr.i.0 = phi double [ %tmp.4.i.i, %no_exit.i ], [ 0.000000e+00, %entry ], [ 0.000000e+00, %then.i ], [ 0.000000e+00, %_Z5checkd.exit ]          ; <double> [#uses=1]
        %first_addr.0.i.2.rec = cast uint %indvar to int                ; <int> [#uses=1]
        %first_addr.0.i.2 = getelementptr [2000 x double]* %data, int 0, uint %indvar           ; <double*> [#uses=1]
        %inc.i.rec = add int %first_addr.0.i.2.rec, 1           ; <int> [#uses=1]
        %inc.i = getelementptr [2000 x double]* %data, int 0, int %inc.i.rec            ; <double*> [#uses=1]
        %tmp.3.i.i = load double* %first_addr.0.i.2             ; <double> [#uses=1]
        %tmp.4.i.i = add double %result_addr.i.0, %tmp.3.i.i            ; <double> [#uses=2]
        %tmp.2.i = seteq double* %inc.i, getelementptr ([2000 x double]* %data, int 0, int 2000)                ; <bool> [#uses=1]
        %indvar.next = add uint %indvar, 1              ; <uint> [#uses=1]
        br bool %tmp.2.i, label %_Z10accumulateIPddET0_T_S2_S1_.exit, label %no_exit.i

To this:

.LBB_Z4testIPddEvT_S1_T0__1:    # no_exit.i
        fldl data(,%eax,8)
        fldl 16(%esp)
        faddp %st(1)
        fstpl 16(%esp)
        incl %eax
        movl %eax, %ecx
        shll $3, %ecx
        cmpl $16000, %ecx
        #FP_REG_KILL
        jne .LBB_Z4testIPddEvT_S1_T0__1 # no_exit.i

instead of this:

.LBB_Z4testIPddEvT_S1_T0__1:    # no_exit.i
        fldl data(,%eax,8)
        fldl 16(%esp)
        faddp %st(1)
        fstpl 16(%esp)
        incl %eax
        leal data(,%eax,8), %ecx
        leal data+16000, %edx
        cmpl %edx, %ecx
        #FP_REG_KILL
        jne .LBB_Z4testIPddEvT_S1_T0__1 # no_exit.i


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19425 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-09 20:52:51 +00:00
..
Analysis Add last four createXxxPass functions 2005-01-09 20:42:52 +00:00
Archive Remove potential platform portability issue with size of "int". 2004-12-29 01:20:24 +00:00
AsmParser Silence VS warnings. 2005-01-08 20:07:03 +00:00
Bytecode Remove potential platform portability issue with size of "int". 2004-12-29 01:20:24 +00:00
CodeGen Add some folds for == and != comparisons. This allows us to 2005-01-09 20:52:51 +00:00
Debugger Correct the comments and file header. 2004-12-23 21:16:46 +00:00
ExecutionEngine Silence warnings 2005-01-08 20:13:44 +00:00
Linker Remove un-needed #includes. 2004-12-20 04:15:44 +00:00
Support Use size_t instead of long to represent memory usage. long is 32 bits 2005-01-08 20:15:57 +00:00
System Use size_t instead of long to represent memory usage. long is 32 bits 2005-01-08 20:15:57 +00:00
Target Codegen (Reg|imm)+&GV as an LEA, because we cannot put it into the immediate field 2005-01-09 20:20:29 +00:00
Transforms Fix VS warnings 2005-01-08 19:48:40 +00:00
VMCore Allow arrays to have more than 4G elements. 2005-01-08 20:19:51 +00:00
Makefile Add the Linker library 2004-11-14 21:54:41 +00:00