1f4a2713aSLionel Sambuc; RUN: llc < %s -march=nvptx -mcpu=sm_20 | FileCheck %s --check-prefix=PTX32 2f4a2713aSLionel Sambuc; RUN: llc < %s -march=nvptx64 -mcpu=sm_20 | FileCheck %s --check-prefix=PTX64 3f4a2713aSLionel Sambuc 4f4a2713aSLionel Sambuc; Ensure we access the local stack properly 5f4a2713aSLionel Sambuc 6f4a2713aSLionel Sambuc; PTX32: mov.u32 %r{{[0-9]+}}, __local_depot{{[0-9]+}}; 7f4a2713aSLionel Sambuc; PTX32: cvta.local.u32 %SP, %r{{[0-9]+}}; 8f4a2713aSLionel Sambuc; PTX32: ld.param.u32 %r{{[0-9]+}}, [foo_param_0]; 9*0a6a1f1dSLionel Sambuc; PTX32: st.volatile.u32 [%SP+0], %r{{[0-9]+}}; 10*0a6a1f1dSLionel Sambuc; PTX64: mov.u64 %rd{{[0-9]+}}, __local_depot{{[0-9]+}}; 11*0a6a1f1dSLionel Sambuc; PTX64: cvta.local.u64 %SP, %rd{{[0-9]+}}; 12f4a2713aSLionel Sambuc; PTX64: ld.param.u32 %r{{[0-9]+}}, [foo_param_0]; 13*0a6a1f1dSLionel Sambuc; PTX64: st.volatile.u32 [%SP+0], %r{{[0-9]+}}; 14f4a2713aSLionel Sambucdefine void @foo(i32 %a) { 15f4a2713aSLionel Sambuc %local = alloca i32, align 4 16*0a6a1f1dSLionel Sambuc store volatile i32 %a, i32* %local 17f4a2713aSLionel Sambuc ret void 18f4a2713aSLionel Sambuc} 19