[LLVMbugs] [Bug 1564] NEW: opt -adce produces incorrect code

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Thu Jul 19 18:57:01 PDT 2007


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

           Summary: opt -adce produces incorrect code
           Product: new-bugs
           Version: unspecified
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: new bugs
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: nick.smallbone at gmail.com


I have the following module:

    define fastcc void @out() {
    start:
            br label %loop
    unreachable:
            unreachable
    loop:
            switch i32 0, label %unreachable [
                     i32 0, label %loop
            ]
    }

As far as I can see, this program should be an infinite loop. However, with LLVM
2.0, running opt -adce on the module produces

    define fastcc void @out() {
            br label %unreachable
    unreachable:
            unreachable
    }

which is an incorrect program, since the "unreachable" statement is obviously
reachable.



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