[LLVMbugs] [Bug 21100] New: Missing .align on function return values

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Tue Sep 30 13:41:39 PDT 2014


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

            Bug ID: 21100
           Summary: Missing .align on function return values
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Backend: PTX
          Assignee: unassignedbugs at nondot.org
          Reporter: wujingyue at gmail.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Created attachment 13101
  --> http://llvm.org/bugs/attachment.cgi?id=13101&action=edit
IR

Test cases attached. 

vector.ll:

define internal fastcc <2 x float> @_Z9calculateDv2_f(<2 x float> %input) #0 {  
entry:                                                                          
  %0 = extractelement <2 x float> %input, i64 0                                 
  %conv1 = fadd float %0, 1.000000e+00                                          
  %1 = insertelement <2 x float> undef, float %conv1, i64 0                     
  %2 = extractelement <2 x float> %input, i64 1                                 
  %conv4 = fadd float %2, 2.000000e+00                                          
  %3 = insertelement <2 x float> %1, float %conv4, i64 1                        
  ret <2 x float> %3                                                            
}                                                                               

; Function Attrs: nounwind                                                      
define void @foo(<2 x float> %input, <2 x float>* nocapture %output) #1 {       
entry:                                                                          
  %call = tail call fastcc <2 x float> @_Z9calculateDv2_f(<2 x float> %input)
#2  
  store <2 x float> %call, <2 x float>* %output, align 8                        
  ret void                                                                      
}

llc vector.ll -o vector.ptx -march=nvptx -mcpu=sm_35

vector.ptx:

...
.param .align 8 .b8 param0[8];                                                
st.param.v2.f32 [param0+0], {%f1, %f2};                                     
.param .b64 retval0;                                                        
call.uni (retval0),                                                         
_Z9calculateDv2_f,                                                          
(                                                                           
param0                                                                      
);                                                                          
...

retval0 should be tagged with (.align 8) because <2 x float> is 8-byte-aligned.

-- 
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/20140930/ea6852c6/attachment.html>


More information about the llvm-bugs mailing list