llvm-6502/lib/CodeGen
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
..
SelectionDAG Add some folds for == and != comparisons. This allows us to 2005-01-09 20:52:51 +00:00
AsmPrinter.cpp Silence VS warnings 2005-01-08 19:59:10 +00:00
BranchFolding.cpp Changes For Bug 352 2004-09-01 22:55:40 +00:00
IntrinsicLowering.cpp Fix #includes of i*.h => Instructions.h as per PR403. 2004-07-29 17:30:56 +00:00
LiveInterval.cpp Prevent accessing past the end of the intervals vector, this fixes 2004-12-04 01:22:09 +00:00
LiveInterval.h Fix typeo 2004-11-18 04:31:10 +00:00
LiveIntervalAnalysis.cpp Silence warnings from VS 2005-01-08 19:55:00 +00:00
LiveIntervalAnalysis.h For PR387:\ 2004-12-07 04:03:45 +00:00
LiveVariables.cpp Do not use variable sized arrays in C++, they are non-portable. Patch 2004-10-25 18:44:14 +00:00
MachineBasicBlock.cpp Move method bodies that depend on <algorithm> from MBB.h to MBB.cpp 2004-10-26 15:43:42 +00:00
MachineCodeEmitter.cpp Fix the FIXME, nuke the JIT specific forceCompilationOf method. 2004-11-22 21:54:35 +00:00
MachineFunction.cpp Silence warnings from VS 2005-01-08 19:55:00 +00:00
MachineInstr.cpp Allow machine operands to represent global variables with offsets. This is 2004-10-15 04:38:41 +00:00
Makefile Change Library Names Not To Conflict With Others When Installed 2004-10-27 23:18:45 +00:00
Passes.cpp Changes For Bug 352 2004-09-01 22:55:40 +00:00
PHIElimination.cpp Changes For Bug 352 2004-09-01 22:55:40 +00:00
PhysRegTracker.h Improved PhysRegTracker interface. RegAlloc lazily allocates the register tracker using a std::auto_ptr 2004-02-23 06:10:13 +00:00
PrologEpilogInserter.cpp Put this change back in after testing from Reid proved its innocence. getSpillSize now returns value in bits 2004-08-29 22:00:24 +00:00
RegAllocIterativeScan.cpp Silence VS warnings 2005-01-08 19:53:50 +00:00
RegAllocLinearScan.cpp Silence VS warnings 2005-01-08 19:53:50 +00:00
RegAllocLocal.cpp Clean up the MachineBasicBlock.h file, percolating #includes into this file. 2004-10-26 15:35:58 +00:00
RegAllocSimple.cpp Changes For Bug 352 2004-09-01 22:55:40 +00:00
TwoAddressInstructionPass.cpp Make the 2-address instruction lowering pass smarter in two ways: 2005-01-02 02:34:12 +00:00
UnreachableBlockElim.cpp Changes For Bug 352 2004-09-01 22:55:40 +00:00
VirtRegMap.cpp Clean up the MachineBasicBlock.h file, percolating #includes into this file. 2004-10-26 15:35:58 +00:00
VirtRegMap.h When a virtual register is folded into an instruction, keep track of whether 2004-10-01 23:15:36 +00:00