summaryrefslogtreecommitdiffstats
path: root/clang/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
commita1b4ed8003d4f8bde8b4d459b8002e7e21e88456 (patch)
treee75ded96ab1d4cffc2e4e31f5c32e8345477d11c /clang/test/CodeGen/builtinshufflevector.c
parent3ab94df276ea939f05fc2395876a06a2e73f5ad4 (diff)
downloadbcm5719-llvm-a1b4ed8003d4f8bde8b4d459b8002e7e21e88456.tar.gz
bcm5719-llvm-a1b4ed8003d4f8bde8b4d459b8002e7e21e88456.zip
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. llvm-svn: 51113
Diffstat (limited to 'clang/test/CodeGen/builtinshufflevector.c')
-rw-r--r--clang/test/CodeGen/builtinshufflevector.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/test/CodeGen/builtinshufflevector.c b/clang/test/CodeGen/builtinshufflevector.c
new file mode 100644
index 00000000000..46741d34566
--- /dev/null
+++ b/clang/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);}
+
OpenPOWER on IntegriCloud