[LLVMbugs] [Bug 16278] New: Can't generate constant memory by NVPTX

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sat Jun 8 05:38:56 PDT 2013


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

            Bug ID: 16278
           Summary: Can't generate constant memory by NVPTX
           Product: new-bugs
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: swpenim at gmail.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Created attachment 10656
  --> http://llvm.org/bugs/attachment.cgi?id=10656&action=edit
the llvm-ir sample

As the thread in http://ppt.cc/WT8z.  llvm-ir sample is in the attachment.

I have a kernel that contains a constant variable declared in file scope like
this: 

   constant one_f = 1.0f; 
__kernel void test( ...){    ...  } 

Then it is compiled to llvm-ir: 

@one_f = addrspace(4) global float 1.000000e+00, align 4 
define void test(...){   ...   } 

Finally ptx: 

.visible .global .align 4 .f32 one_f = 0f3F800000; 
.entry test( ...) { ... } 

one_f is placed in global memory and load it by ld.global.f32 


Antony Yu

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20130608/97ee755e/attachment.html>


More information about the llvm-bugs mailing list