summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/NVPTX/nvcl-param-align.ll
diff options
context:
space:
mode:
authorJingyue Wu <jingyue@google.com>2014-12-17 17:59:04 +0000
committerJingyue Wu <jingyue@google.com>2014-12-17 17:59:04 +0000
commite4c9cf04f5be0547938e5442caa10a3f56073a8f (patch)
treed7f7b1bfd6859446b2172c1a0e78949a0db1f923 /llvm/test/CodeGen/NVPTX/nvcl-param-align.ll
parent0e60abcf71a58f0ec0c95585e2a3fd1941cd428e (diff)
downloadbcm5719-llvm-e4c9cf04f5be0547938e5442caa10a3f56073a8f.tar.gz
bcm5719-llvm-e4c9cf04f5be0547938e5442caa10a3f56073a8f.zip
[NVPTX] Fix bugs related to isSingleValueType
Summary: With isSingleValueType starting to treat vector types as single-value types, code that uses this interface needs to be updated. Test Plan: vector-global.ll nvcl-param-align.ll Reviewers: jholewinski Reviewed By: jholewinski Subscribers: llvm-commits, meheff, eliben, jholewinski Differential Revision: http://reviews.llvm.org/D6573 llvm-svn: 224440
Diffstat (limited to 'llvm/test/CodeGen/NVPTX/nvcl-param-align.ll')
-rw-r--r--llvm/test/CodeGen/NVPTX/nvcl-param-align.ll16
1 files changed, 16 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/NVPTX/nvcl-param-align.ll b/llvm/test/CodeGen/NVPTX/nvcl-param-align.ll
new file mode 100644
index 00000000000..c1a489f1fc4
--- /dev/null
+++ b/llvm/test/CodeGen/NVPTX/nvcl-param-align.ll
@@ -0,0 +1,16 @@
+; RUN: llc < %s -march=nvptx -mcpu=sm_20 | FileCheck %s
+
+target triple = "nvptx-unknown-nvcl"
+
+; CHECK-LABEL: .entry foo(
+define void @foo(i64 %img, i64 %sampler, <5 x float>* %v) {
+; The parameter alignment should be the next power of 2 of 5xsizeof(float),
+; which is 32.
+; CHECK: .param .u32 .ptr .align 32 foo_param_2
+ ret void
+}
+
+!nvvm.annotations = !{!1, !2, !3}
+!1 = !{void (i64, i64, <5 x float>*)* @foo, !"kernel", i32 1}
+!2 = !{void (i64, i64, <5 x float>*)* @foo, !"rdoimage", i32 0}
+!3 = !{void (i64, i64, <5 x float>*)* @foo, !"sampler", i32 1}
OpenPOWER on IntegriCloud