summaryrefslogtreecommitdiff
path: root/gcc/testsuite/c-c++-common/torture/vshuf-8.inc
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@baserock.org>2014-10-30 09:35:42 +0000
committer <>2015-01-09 11:51:27 +0000
commitc27a97d04853380f1e80525391b3f0d156ed4c84 (patch)
tree68ffaade7c605bc80cffa18360799c98a810976f /gcc/testsuite/c-c++-common/torture/vshuf-8.inc
parent6af3fdec2262dd94954acc5e426ef71cbd4521d3 (diff)
downloadgcc-tarball-c27a97d04853380f1e80525391b3f0d156ed4c84.tar.gz
Imported from /home/lorry/working-area/delta_gcc-tarball/gcc-4.9.2.tar.bz2.gcc-4.9.2
Diffstat (limited to 'gcc/testsuite/c-c++-common/torture/vshuf-8.inc')
-rw-r--r--gcc/testsuite/c-c++-common/torture/vshuf-8.inc101
1 files changed, 101 insertions, 0 deletions
diff --git a/gcc/testsuite/c-c++-common/torture/vshuf-8.inc b/gcc/testsuite/c-c++-common/torture/vshuf-8.inc
new file mode 100644
index 0000000000..e6475226a1
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/torture/vshuf-8.inc
@@ -0,0 +1,101 @@
+/* Test fragment for vectors of 8 elements. */
+
+#ifndef UNSUPPORTED
+
+struct S
+{
+ V in;
+ VI mask;
+ V out;
+};
+
+struct S tests[] = {
+ {
+ { A1, B1, C1, D1, E1, F1, G1, H1 },
+ { 0, 1, 2, 3, 4, 5, 6, 7 },
+ { A1, B1, C1, D1, E1, F1, G1, H1 },
+ },
+ {
+ { A1, B1, C1, D1, E1, F1, G1, H1 },
+ { 0x10, 0x21, 0x32, 0x43, 0x54, 0x65, 0x76, 0x87 },
+ { A1, B1, C1, D1, E1, F1, G1, H1 },
+ },
+ {
+ { A1, B1, C1, D1, E1, F1, G1, H1 },
+ { 7, 6, 5, 4, 3, 2, 1, 0 },
+ { H1, G1, F1, E1, D1, C1, B1, A1 },
+ },
+ {
+ { A1, B1, C1, D1, E1, F1, G1, H1 },
+ { 7, 0, 5, 3, 2, 4, 1, 6 },
+ { H1, A1, F1, D1, C1, E1, B1, G1 },
+ },
+ {
+ { A1, B1, C1, D1, E1, F1, G1, H1 },
+ { 0, 2, 1, 3, 4, 6, 5, 7 },
+ { A1, C1, B1, D1, E1, G1, F1, H1 },
+ },
+ {
+ { A2, B2, C2, D2, E2, F2, G2, H2 },
+ { 3, 1, 2, 0, 7, 5, 6, 4 },
+ { D2, B2, C2, A2, H2, F2, G2, E2 },
+ },
+ {
+ { A2, B2, C2, D2, E2, F2, G2, H2 },
+ { 0, 0, 0, 0 },
+ { A2, A2, A2, A2, A2, A2, A2, A2 },
+ },
+ {
+ { A2, B2, C2, D2, E2, F2, G2, H2 },
+ { 1, 6, 1, 6, 1, 6, 1, 6 },
+ { B2, G2, B2, G2, B2, G2, B2, G2 },
+ }
+};
+
+struct S2
+{
+ V in1, in2;
+ VI mask;
+ V out;
+};
+
+struct S2 tests2[] = {
+ {
+ { A1, B1, C1, D1, E1, F1, G1, H1 },
+ { A2, B2, C2, D2, E2, F2, G2, H2 },
+ { 0, 1, 2, 3, 4, 5, 6, 7 },
+ { A1, B1, C1, D1, E1, F1, G1, H1 },
+ },
+ {
+ { A1, B1, C1, D1, E1, F1, G1, H1 },
+ { A2, B2, C2, D2, E2, F2, G2, H2 },
+ { 8, 9, 10, 11, 12, 13, 14, 15 },
+ { A2, B2, C2, D2, E2, F2, G2, H2 },
+ },
+ {
+ { A1, B1, C1, D1, E1, F1, G1, H1 },
+ { A2, B2, C2, D2, E2, F2, G2, H2 },
+ { 0, 8, 1, 9, 2, 10, 3, 11 },
+ { A1, A2, B1, B2, C1, C2, D1, D2 },
+ },
+ {
+ { A1, B1, C1, D1, E1, F1, G1, H1 },
+ { A2, B2, C2, D2, E2, F2, G2, H2 },
+ { 0, 15, 4, 11, 12, 3, 7, 8 },
+ { A1, H2, E1, D2, E2, D1, H1, A2 },
+ },
+ {
+ { A1, B1, C1, D1, E1, F1, G1, H1 },
+ { A2, B2, C2, D2, E2, F2, G2, H2 },
+ { 0, 0, 0, 0, 0, 0, 0, 0 },
+ { A1, A1, A1, A1, A1, A1, A1, A1 },
+ },
+ {
+ { A1, B1, C1, D1, E1, F1, G1, H1 },
+ { A2, B2, C2, D2, E2, F2, G2, H2 },
+ { 0x1e, 0x2e, 0x3e, 0x4e, 0x5e, 0x6e, 0x7e, 0x8e },
+ { G2, G2, G2, G2, G2, G2, G2, G2 },
+ },
+};
+
+#endif