2011-09-27 00:20:34 +08:00
|
|
|
; RUN: llc < %s -march=ptx32 -mattr=sm20 | FileCheck %s
|
|
|
|
|
|
|
|
define ptx_device float @stack1(float %a) {
|
2011-09-27 00:20:38 +08:00
|
|
|
; CHECK: .local .align 4 .b32 __local0;
|
|
|
|
%a.2 = alloca float, align 4
|
|
|
|
; CHECK: st.local.f32 [__local0], %f0
|
|
|
|
store float %a, float* %a.2
|
|
|
|
%a.3 = load float* %a.2
|
|
|
|
ret float %a.3
|
|
|
|
}
|
|
|
|
|
|
|
|
define ptx_device float @stack1_align8(float %a) {
|
|
|
|
; CHECK: .local .align 8 .b32 __local0;
|
|
|
|
%a.2 = alloca float, align 8
|
2011-09-27 00:20:34 +08:00
|
|
|
; CHECK: st.local.f32 [__local0], %f0
|
|
|
|
store float %a, float* %a.2
|
|
|
|
%a.3 = load float* %a.2
|
|
|
|
ret float %a.3
|
|
|
|
}
|