[LLVMbugs] [Bug 674] NEW: Store size incorrect after legalize

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Wed Dec 7 08:24:49 PST 2005


http://llvm.cs.uiuc.edu/bugs/show_bug.cgi?id=674

           Summary: Store size incorrect after legalize
           Product: libraries
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Common Code Generator Code
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: alenhar2 at uiuc.edu


In the following code, the store is legalized to a 64bit store (on alpha) when
it should be a truncstore.  The load is a corect zextload.  This is a legalize bug.

; ModuleID = '<stdin>'
target endian = little
target pointersize = 64
%_2E_str_1 = external global [6 x sbyte]                ; <[6 x sbyte]*> [#uses=1]
%_2E_str_2 = external global [7 x sbyte]                ; <[7 x sbyte]*> [#uses=1]

implementation   ; Functions:

bool %main_loopexit_2E_1_2E_ce(sbyte %val.1.1, sbyte** %mem_tmp.2.0.out) {
newFuncRoot:
        br label %loopexit.1.ce

loopexit.1.puts.exit_crit_edge.exitStub:                ; preds = %loopexit.1.ce
        store sbyte* %mem_tmp.2.0, sbyte** %mem_tmp.2.0.out
        ret bool true

loopexit.1.no_exit.i_crit_edge.exitStub:                ; preds = %loopexit.1.ce
        store sbyte* %mem_tmp.2.0, sbyte** %mem_tmp.2.0.out
        ret bool false

loopexit.1.ce:          ; preds = %newFuncRoot
        %tmp.52 = setne sbyte %val.1.1, 0               ; <bool> [#uses=1]
        %mem_tmp.2.0 = select bool %tmp.52, sbyte* getelementptr ([6 x sbyte]*
%_2E_str_1, long 0, long 0), sbyte* getelementptr ([7 x sbyte]* %_2E_str_2, long
0, long 0)            ; <sbyte*> [#uses=3]
        %tmp.65.i = load sbyte* %mem_tmp.2.0            ; <sbyte> [#uses=1]
        %tmp.76.i = seteq sbyte %tmp.65.i, 0            ; <bool> [#uses=1]
        br bool %tmp.76.i, label %loopexit.1.puts.exit_crit_edge.exitStub, label
%loopexit.1.no_exit.i_crit_edge.exitStub
}



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