[LLVMbugs] [Bug 1542] NEW: loop variants hoisted out of loop

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Fri Jul 6 18:19:12 PDT 2007


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

           Summary: loop variants hoisted out of loop
           Product: libraries
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Loop Optimizer
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: nicholas at mxc.ca


The attached is a miscompile was reduced by bugpoint. Run "opt
bugpoint-tooptimize.bc -loop-rotate -licm -lcssa" to reproduce.

I strongly recommend that anyone trying to visualize what's going on use opt
--print-cfg on the before and after.

The problem is in the optimization of the bb38 and bb32 loop. This sequence in
bb32 is clearly decrementing a value:

  %tmp36 = load i32* %tmp5
  %tmp37 = sub i32 %tmp36, 1
  store i32 %tmp37, i32* %tmp5

however in the optimized code, the load of %tmp5 is hoisted into bb.nph outside
the loop (%tmp5.promoted).



------- 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