summaryrefslogtreecommitdiff
path: root/test/CodeGenOpenCL/vectorLoadStore.cl
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2012-08-19 10:33:04 +0000
committerDimitry Andric <dim@FreeBSD.org>2012-08-19 10:33:04 +0000
commit657bc3d9848e3be92029b2416031340988cd0111 (patch)
tree5b9c2fa9d79942fbdce3d618e37e27c18263af9a /test/CodeGenOpenCL/vectorLoadStore.cl
parent56d91b49b13fe55c918afbda19f6165b5fbff87a (diff)
Notes
Diffstat (limited to 'test/CodeGenOpenCL/vectorLoadStore.cl')
-rw-r--r--test/CodeGenOpenCL/vectorLoadStore.cl9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/CodeGenOpenCL/vectorLoadStore.cl b/test/CodeGenOpenCL/vectorLoadStore.cl
new file mode 100644
index 000000000000..44bc7bd25d45
--- /dev/null
+++ b/test/CodeGenOpenCL/vectorLoadStore.cl
@@ -0,0 +1,9 @@
+// RUN: %clang_cc1 %s -emit-llvm -O0 -o - | FileCheck %s
+
+typedef char char3 __attribute((ext_vector_type(3)));;
+
+// Check for optimized vec3 load/store which treats vec3 as vec4.
+void foo(char3 *P, char3 *Q) {
+ *P = *Q;
+ // CHECK: %{{.*}} = shufflevector <4 x i8> %{{.*}}, <4 x i8> undef, <3 x i32> <i32 0, i32 1, i32 2>
+}