[LLVMbugs] [Bug 15518] New: Odd optimization results, resume undef, br i1 undef

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Thu Mar 14 17:57:50 PDT 2013


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

            Bug ID: 15518
           Summary: Odd optimization results, resume undef, br i1 undef
           Product: new-bugs
           Version: 3.2
          Hardware: PC
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: bruce.mitchener at gmail.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

If you run opt -O3 on the attached .bc file, you end up with some odd results
in the main() function, notably stuff like:

_ZNSt3__14listIi15stack_allocatorIiLj4EEED1Ev.exit75: ; preds =
%while.cond.backedge.i.i.i.i73, %if.then.i.i.i.i63, %cond.end44
  ret i32 0

lpad33:                                           ; preds = %cond.false42
  %15 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)*
@__gxx_personality_v0 to i8*)
          cleanup
  br i1 undef, label %eh.resume, label %if.then.i.i.i.i35

if.then.i.i.i.i35:                                ; preds = %lpad33
  br i1 undef, label %eh.resume, label %while.body.lr.ph.i.i.i.i

while.body.lr.ph.i.i.i.i:                         ; preds = %if.then.i.i.i.i35
  br label %while.body.i.i.i.i37

while.body.i.i.i.i37:                             ; preds =
%while.cond.backedge.i.i.i.i, %while.body.lr.ph.i.i.i.i
  br i1 undef, label %if.then.i.i.i.i.i, label %while.cond.backedge.i.i.i.i

while.cond.backedge.i.i.i.i:                      ; preds = %if.then.i.i.i.i.i,
%while.body.i.i.i.i37
  br i1 undef, label %eh.resume, label %while.body.i.i.i.i37

if.then.i.i.i.i.i:                                ; preds =
%while.body.i.i.i.i37
  br label %while.cond.backedge.i.i.i.i

eh.resume:                                        ; preds =
%while.cond.backedge.i.i.i.i, %if.then.i.i.i.i35, %lpad33
  resume { i8*, i32 } undef

It seems like an additional simplification of CFG should have happened perhaps?

I get this with the 3.2 release in conjunction with emscripten (ToT) + changes
to use a current libcxx.

Any ideas who is doing something wrong here? (Me, emscripten, LLVM?)

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20130315/d09f5d53/attachment.html>


More information about the llvm-bugs mailing list