aboutsummaryrefslogtreecommitdiff
path: root/SingleSource/Regression/C/gcc-c-torture/execute/simd-6.c
diff options
context:
space:
mode:
Diffstat (limited to 'SingleSource/Regression/C/gcc-c-torture/execute/simd-6.c')
-rw-r--r--SingleSource/Regression/C/gcc-c-torture/execute/simd-6.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/SingleSource/Regression/C/gcc-c-torture/execute/simd-6.c b/SingleSource/Regression/C/gcc-c-torture/execute/simd-6.c
new file mode 100644
index 00000000..ca4aabc4
--- /dev/null
+++ b/SingleSource/Regression/C/gcc-c-torture/execute/simd-6.c
@@ -0,0 +1,22 @@
+extern void abort (void);
+extern int memcmp (const void *, const void *, __SIZE_TYPE__);
+
+typedef unsigned char v8qi __attribute__((vector_size(8)));
+
+v8qi foo(v8qi x, v8qi y)
+{
+ return x * y;
+}
+
+int main()
+{
+ v8qi a = { 1, 2, 3, 4, 5, 6, 7, 8 };
+ v8qi b = { 3, 3, 3, 3, 3, 3, 3, 3 };
+ v8qi c = { 3, 6, 9, 12, 15, 18, 21, 24 };
+ v8qi r;
+
+ r = foo (a, b);
+ if (memcmp (&r, &c, 8) != 0)
+ abort ();
+ return 0;
+}