[LLVMbugs] [Bug 2967] New: instcombine is removing a traping instruction

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Tue Oct 28 06:48:48 PDT 2008


           Summary: instcombine is removing a traping instruction
           Product: libraries
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Scalar Optimizations
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: alenhar2 at uiuc.edu
                CC: llvmbugs at cs.uiuc.edu

In this code, instcombine reduces it to ret void.  The trapping load is
removed.  Essentially I would contend the load should be treated in the same
way a noreturn function before an unreachable is treated.

target datalayout =
target triple = "i386-pc-linux-gnu"

define void @foo(i32 %x) nounwind {
        %0 = icmp eq i32 %x, 0          ; <i1> [#uses=1]
        br i1 %0, label %bb, label %return

bb:             ; preds = %entry
        %1 = volatile load i32* null            ; <i32> [#uses=0]
        br label %return
return:         ; preds = %entry
        ret void

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