1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-31 16:02:52 +01:00
llvm-mirror/test/CodeGen/PTX/stack-object.ll
Justin Holewinski 52c50104d7 PTX: Fix detection of stack load/store vs. global load/store, as well as fix the
printing of local offsets

llvm-svn: 140547
2011-09-26 18:57:22 +00:00

20 lines
533 B
LLVM

; RUN: llc < %s -march=ptx32 -mattr=sm20 | FileCheck %s
define ptx_device float @stack1(float %a) {
; CHECK: .local .align 4 .b8 __local0[4];
%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 .b8 __local0[4];
%a.2 = alloca float, align 8
; CHECK: st.local.f32 [__local0], %f0
store float %a, float* %a.2
%a.3 = load float* %a.2
ret float %a.3
}