summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/other/arm-neon-1.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.dg/other/arm-neon-1.C')
-rw-r--r--gcc/testsuite/g++.dg/other/arm-neon-1.C18
1 files changed, 18 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/other/arm-neon-1.C b/gcc/testsuite/g++.dg/other/arm-neon-1.C
new file mode 100644
index 000000000..33cc04b69
--- /dev/null
+++ b/gcc/testsuite/g++.dg/other/arm-neon-1.C
@@ -0,0 +1,18 @@
+/* Basic smoke test for arm_neon.h */
+
+/* { dg-do assemble } */
+/* { dg-require-effective-target arm_neon_ok } */
+/* { dg-add-options arm_neon } */
+
+#include "arm_neon.h"
+
+float a[4];
+
+void test(void)
+{
+ float32x2x2_t v;
+ float32x2_t res;
+ v = vld2_f32(a);
+ res = vadd_f32(v.val[0], v.val[1]);
+ vst1_f32(a, res);
+}