[LLVMbugs] [Bug 1256] NEW: llvm-upgrade cannot distinguish between	int tmp & uint tmp etc.
    bugzilla-daemon at cs.uiuc.edu 
    bugzilla-daemon at cs.uiuc.edu
       
    Wed Mar 14 06:18:01 PDT 2007
    
    
  
http://llvm.org/bugs/show_bug.cgi?id=1256
           Summary: llvm-upgrade cannot distinguish between int tmp & uint
                    tmp etc.
           Product: tools
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: major
          Priority: P2
         Component: llvm-upgrade
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: patil.nikhil at gmail.com
(Mis-upgradation. No warning issued.)
The following testcase should be self-explanatory... llvm-upgrade can't pick 
the correct %tmp when both int %tmp and uint %tmp are defined. Similar problem 
occurs with sbyte and ubyte.
Testcase: zxc.ll:
target datalayout = "e-p:32:32"
target endian = little
target pointersize = 32
target triple = "i686-pc-linux-gnu"
implementation   ; Functions:
void %_Z4func() {
entry:
        %tmp = add int 0, 0
        %tmp = add uint 1, 1
        %tmp = add ubyte 1, 2
        %tmp = add sbyte 2, 3
        call void %f (int %tmp)
        call void %g (ubyte %tmp)
        ret void
}
declare void %f(int)
declare void %g(ubyte)
Output of $llvm-upgrade zxc.ll
; ModuleID = 'zxc.ll'
target datalayout = "e-p:32:32"
target triple = "i686-pc-linux-gnu"
implementation   ; Functions:
define void @_Z4func() {
entry:
        %tmp = add i32 0, 0             ; <i32> [#uses=0]
        %tmp.upgrd.1 = add i32 1, 1             ; <i32> [#uses=1]
        %tmp.upgrd.2 = add i8 1, 2              ; <i8> [#uses=0]
        %tmp.upgrd.3 = add i8 2, 3              ; <i8> [#uses=1]
        call void @f( i32 %tmp.upgrd.1 )
        call void @g( i8 %tmp.upgrd.3 )
        ret void
}
declare void @f(i32)
declare void @g(i8)
Expected output:
; ModuleID = 'zxc.ll'
target datalayout = "e-p:32:32"
target triple = "i686-pc-linux-gnu"
implementation   ; Functions:
define void @_Z4func() {
entry:
        %tmp = add i32 0, 0             ; <i32> [#uses=0]
        %tmp.upgrd.1 = add i32 1, 1             ; <i32> [#uses=1]
        %tmp.upgrd.2 = add i8 1, 2              ; <i8> [#uses=0]
        %tmp.upgrd.3 = add i8 2, 3              ; <i8> [#uses=1]
        call void @f( i32 %tmp )         ; *XXX*
        call void @g( i8 %tmp.upgrd.2 )  ; *XXX*
        ret void
}
declare void @f(i32)
declare void @g(i8)
------- 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