aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruno Cardoso Lopes <bruno.cardoso@gmail.com>2011-08-24 01:35:04 +0000
committerBruno Cardoso Lopes <bruno.cardoso@gmail.com>2011-08-24 01:35:04 +0000
commit3f7eb9aa9921fba4ff802d77152941255ce42b53 (patch)
tree5ab409a0b5bf73b0426904507462f4760f94e6ae
parentf2be652fd796e83f109d1f2a074811a513569105 (diff)
Add testcase for r138411
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138422 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--test/CodeGen/avx-shuffle-builtins.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/CodeGen/avx-shuffle-builtins.c b/test/CodeGen/avx-shuffle-builtins.c
new file mode 100644
index 0000000000..c11780a5e3
--- /dev/null
+++ b/test/CodeGen/avx-shuffle-builtins.c
@@ -0,0 +1,16 @@
+// RUN: %clang_cc1 %s -O3 -triple=x86_64-apple-darwin -target-feature +avx -emit-llvm -o - | FileCheck %s
+
+// Don't include mm_malloc.h, it's system specific.
+#define __MM_MALLOC_H
+
+#include <immintrin.h>
+
+//
+// Test LLVM IR codegen of shuffle instructions
+//
+
+__m256 x(__m256 a, __m256 b) {
+ // Check if the mask is correct
+ // CHECK: shufflevector{{.*}}<i32 3, i32 2, i32 8, i32 11, i32 7, i32 6, i32 12, i32 15>
+ return _mm256_shuffle_ps(a, b, 203);
+}