[LLVMbugs] [Bug 12754] New: Identical Instructions are not hoisted above a branch

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Mon May 7 08:02:24 PDT 2012


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

             Bug #: 12754
           Summary: Identical Instructions are not hoisted above a branch
           Product: new-bugs
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: new bugs
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: tjablin at cs.princeton.edu
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified


Created attachment 8506
  --> http://llvm.org/bugs/attachment.cgi?id=8506
Test case

Identical add instructions should be hoisted above a branch, but are not even
with -O2 or -O3. This makes it harder to identify canonical induction variables
than it should be. The relevant parts of the test case are:

clang -O2 addHoistBug.c -emit-llvm -S -o - 

for.body:                                         ; preds = %entry, %for.inc4
  br i1 %tobool, label %if.end, label %for.body.for.inc4_crit_edge

for.body.for.inc4_crit_edge:                      ; preds = %for.body
  %inc5.pre = add i32 %i.011, 1
  br label %for.inc4

if.end:                                           ; preds = %for.body
  %j.07 = add i32 %i.011, 1

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list