[LLVMbugs] [Bug 12898] New: Possibly bug at Loop Strength Reduction

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sun May 20 09:45:40 PDT 2012


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

             Bug #: 12898
           Summary: Possibly bug at Loop Strength Reduction
           Product: libraries
           Version: trunk
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: Loop Optimizer
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: css20 at mail.ru
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified


Created attachment 8601
  --> http://llvm.org/bugs/attachment.cgi?id=8601
bitcode for reproduce a bug

llc bugpoint-reduced-simplified.bc
PHI nodes not grouped at top of basic block!
  %meshStackVariable.phi = phi i32 [ %Opq.sa.calc12, %for.body3.us.i ], [
undef, %for.inc8.us.i ]
void (double*)* @eval_AtA_times_u.fclone.9
Broken module found, compilation aborted!

After llc -print-after-all bugpoint-reduced-simplified.bc you can see:

*** IR Dump After Canonicalize natural loops ***

...

meshBB:                                           ; preds = %for.body3.us.i,
%for.inc8.us.i
  %indvars.iv8.i.SV.phi24 = phi i64 [ undef, %for.body3.us.i ], [ %2,
%for.inc8.us.i ]
  %meshStackVariable.phi = phi i32 [ %Opq.sa.calc12, %for.body3.us.i ], [
undef, %for.inc8.us.i ]
  br i1 true, label %for.body3.lr.ph.us.i.loopexit, label %for.body3.us.i

*** IR Dump After Loop Strength Reduction ***

...

meshBB:                                           ; preds = %for.body3.us.i,
%for.inc8.us.i
  %lsr.iv.next = add i64 %lsr.iv, 1
  %meshStackVariable.phi = phi i32 [ %Opq.sa.calc12, %for.body3.us.i ], [
undef, %for.inc8.us.i ]
  br i1 true, label %for.body3.lr.ph.us.i.loopexit, label %for.body3.us.i

This pass moves "add" instruction before "PHI". Problem exists at llvm 3.1 and
top-of-tree.

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