aboutsummaryrefslogtreecommitdiff
path: root/test/CodeGen/builtinshufflevector.c
diff options
context:
space:
mode:
authorEli Friedman <eli.friedman@gmail.com>2008-05-14 19:38:39 +0000
committerEli Friedman <eli.friedman@gmail.com>2008-05-14 19:38:39 +0000
commitd38617c8a50f9729c254ab76cd359af797c6739b (patch)
tree2b2fbbd20b59bc7972a339b79e420ecdc30834e0 /test/CodeGen/builtinshufflevector.c
parent9d7405fafd5bc08d38bc75579927bf414570bd61 (diff)
Implementation of __builtin_shufflevector, a portable builtin capable of
expressing the full flexibility of the LLVM shufflevector instruction. The expected immediate usage is in *mmintrin.h, so that they don't depend on the mess of gcc-inherited (and not completely implemented) shuffle builtins. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51113 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/builtinshufflevector.c')
-rw-r--r--test/CodeGen/builtinshufflevector.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/CodeGen/builtinshufflevector.c b/test/CodeGen/builtinshufflevector.c
new file mode 100644
index 0000000000..46741d3456
--- /dev/null
+++ b/test/CodeGen/builtinshufflevector.c
@@ -0,0 +1,5 @@
+// RUN: clang -emit-llvm < %s 2>&1 | grep 'shufflevector' | count 1
+typedef int v4si __attribute__ ((vector_size (16)));
+
+v4si a(v4si x, v4si y) {return __builtin_shufflevector(x, y, 3, 2, 5, 7);}
+