[LLVMbugs] [Bug 4261] New: doesn't eliminate complex dead load and store case

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Sun May 24 21:10:46 PDT 2009


           Summary: doesn't eliminate complex dead load and store case
           Product: libraries
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Interprocedural Optimizations
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: nicholas at mxc.ca
                CC: llvmbugs at cs.uiuc.edu

With 'opt -std-compile-opts' LLVM doesn't simplify this:

@_ZGVZ3foovE1x = internal global i64 0, align 8

define void @_Z3foov() nounwind {
        %0 = load i8* bitcast (i64* @_ZGVZ3foovE1x to i8*), align 8
        %1 = icmp eq i8 %0, 0
        br i1 %1, label %bb1, label %return

bb1:            ; preds = %entry
        store i8 1, i8* bitcast (i64* @_ZGVZ3foovE1x to i8*), align 8
        ret void

return:         ; preds = %entry
        ret void

The thing is that because @_ZGVZ3foovE1x is internal, we know that those are
the only two uses of the global. There are two possible values (without the
bitcasts it converts the global into i1) and neither case much matters. The
whole thing is dead.

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