[LLVMbugs] [Bug 863] LSR should CSE expression it inserts into loops.

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Fri Apr 13 14:05:46 PDT 2007


http://llvm.org/bugs/show_bug.cgi?id=863

sabre at nondot.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED



------- Additional Comments From sabre at nondot.org  2007-04-13 16:05 -------
Fixed, patches here:
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20070409/047477.html
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20070409/047479.html
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20070409/047450.html
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20070409/047449.html

Testcases here: CodeGen/X86/isel-sink.ll, CodeGen/ARM/lsr-code-insertion.ll

Here is the new BB after LSR:

bb:             ; preds = %bb.bb_crit_edge, %entry
        %iv.1 = phi i32 [ 0, %entry ], [ %iv.1.inc, %bb.bb_crit_edge ]          ; <i32> [#uses=2]
        %iv. = phi i32 [ 0, %entry ], [ %iv..inc, %bb.bb_crit_edge ]            ; <i32> [#uses=1]
        %tmp1 = load i32* %P3           ; <i32> [#uses=1]
        %tmp3 = load i32* %P4           ; <i32> [#uses=1]
        %tmp. = add i32 %tmp1, %tmp3            ; <i32> [#uses=1]
        %tmp.2 = add i32 %tmp., %iv.1           ; <i32> [#uses=2]
        store i32 %tmp.2, i32* %P1
        store i32 %tmp.2, i32* %P2
        %iv..inc = add i32 %iv., 1              ; <i32> [#uses=2]
        %exitcond = icmp eq i32 %iv..inc, 1000          ; <i1> [#uses=1]
        %iv.1.inc = add i32 %iv.1, 4            ; <i32> [#uses=1]
        br i1 %exitcond, label %return, label %bb.bb_crit_edge

-Chris



------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.



More information about the llvm-bugs mailing list