[LLVMbugs] [Bug 13459] New: scalarrepl introduces bitcast between different address spaces

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed Jul 25 08:22:31 PDT 2012


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

             Bug #: 13459
           Summary: scalarrepl introduces bitcast between different
                    address spaces
           Product: new-bugs
           Version: trunk
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: new bugs
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: matilde.urrutia at gmail.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified


Created attachment 8945
  --> http://llvm.org/bugs/attachment.cgi?id=8945
failing case

scalarrepl introduces a bitcast between different address spaces.
When an alloca is only modified by a memcpy from a constant global variable,
the uses of the alloca are modified to use the constant global variable
directly. The problem appears when the constant global variable is defined in a
different address space than the alloca.

For the attached code, for example, the following bitcast is introduced:

; bitcast from addrspace(3) to default addrspace
%0 = bitcast [9 x i8]* bitcast ([9 x i8] addrspace(3)* @entry.buf to [9 x i8]*)
to i8*

A correct way to handle this case would be to change the type of the uses of
the alloca to match the address space of the constant global.

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