diff options
author | Justin Holewinski <justin.holewinski@gmail.com> | 2011-09-26 16:20:38 +0000 |
---|---|---|
committer | Justin Holewinski <justin.holewinski@gmail.com> | 2011-09-26 16:20:38 +0000 |
commit | 6272c5d874bb2b342b02a16aacc9806b4ac55ffe (patch) | |
tree | 9b9be4ce88dba3596eb89679c132603a460004fa | |
parent | 22f3c59ec30c99282a948ddf98fa40c986e55ccb (diff) |
PTX: Add .align tests to stack object test file
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140537 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | test/CodeGen/PTX/stack-object.ll | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/test/CodeGen/PTX/stack-object.ll b/test/CodeGen/PTX/stack-object.ll index 07cc0ab6d2..aab7f51f1f 100644 --- a/test/CodeGen/PTX/stack-object.ll +++ b/test/CodeGen/PTX/stack-object.ll @@ -1,8 +1,17 @@ ; 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: .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 ; CHECK: st.local.f32 [__local0], %f0 store float %a, float* %a.2 %a.3 = load float* %a.2 |