[LLVMbugs] [Bug 2213] New: gvn fails to detect duplicate bitcast

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Wed Apr 9 07:40:22 PDT 2008


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

           Summary: gvn fails to detect duplicate bitcast
           Product: new-bugs
           Version: unspecified
          Platform: Other
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: new bugs
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: baldrick at free.fr
                CC: llvmbugs at cs.uiuc.edu


Testcase:

define void @f(i8* %x) {
entry:
        %tmp = call i8* @m( i32 12 )            ; <i8*> [#uses=2]
        %tmp1 = bitcast i8* %tmp to i32*                ; <i32*> [#uses=0]
        %tmp2 = bitcast i8* %tmp to i32*                ; <i32*> [#uses=0]
        ret void
}

declare i8* @m(i32)

"opt -gvn" fails to eliminate the second bitcast.  However if you use
%x rather than %tmp in the bitcasts, then the second one is removed.


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