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: [email protected]
          Reporter: [email protected]
                CC: [email protected]
    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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to