[LLVMbugs] [Bug 965] NEW: -globalmodref-aa & unreachable don't go along very well.

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Sun Oct 22 17:33:43 PDT 2006


           Summary: -globalmodref-aa & unreachable don't go along very well.
           Product: libraries
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Global Analyses
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: patil.nikhil at gmail.com


I have been playing with functions marked __attribute__((noreturn));
Specifically consider a following code:

void f(void) __attribute__((noreturn));

int call_f()

void f()

With "opt -globalsmodref-aa -adce" this gets compiled to:

int %call_f() {
    %retval = alloca int, align 4           ; <int*> [#uses=1]
    unreachable ; **** WRONG!!
return:         ; No predecessors!
    %retval = load int* %retval             ; <int> [#uses=1]
    ret int %retval
void %f() {
    br label %bb
bb:             ; preds = %bb, %entry
    br label %bb
return:         ; No predecessors!
    ret void    

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