aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorJustin Holewinski <justin.holewinski@gmail.com>2011-09-26 16:20:34 +0000
committerJustin Holewinski <justin.holewinski@gmail.com>2011-09-26 16:20:34 +0000
commit58788503b887f111ac143bb92e4bbbd87e225b24 (patch)
tree3f872cdb19f5754f4ee0dc461befb730254387e4 /test
parentd5c3920f8d7e3556b7349344523cd572224bf44e (diff)
downloadexternal_llvm-58788503b887f111ac143bb92e4bbbd87e225b24.zip
external_llvm-58788503b887f111ac143bb92e4bbbd87e225b24.tar.gz
external_llvm-58788503b887f111ac143bb92e4bbbd87e225b24.tar.bz2
PTX: Fix some lingering issues with stack allocation
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140535 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r--test/CodeGen/PTX/stack-object.ll10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/CodeGen/PTX/stack-object.ll b/test/CodeGen/PTX/stack-object.ll
new file mode 100644
index 0000000..07cc0ab
--- /dev/null
+++ b/test/CodeGen/PTX/stack-object.ll
@@ -0,0 +1,10 @@
+; RUN: llc < %s -march=ptx32 -mattr=sm20 | FileCheck %s
+
+define ptx_device float @stack1(float %a) {
+ ; CHECK: .local .b32 __local0;
+ %a.2 = alloca float
+ ; CHECK: st.local.f32 [__local0], %f0
+ store float %a, float* %a.2
+ %a.3 = load float* %a.2
+ ret float %a.3
+}