Patchwork [applied] arm_neon.h c++ test

login
register
mail settings
Submitter Paul Brook
Date June 11, 2010, 4:54 p.m.
Message ID <201006111754.47422.paul@codesourcery.com>
Download mbox | patch
Permalink /patch/55343/
State New
Headers show

Comments

Paul Brook - June 11, 2010, 4:54 p.m.
Some time ago I fixed a bug in arm_neon.h [1], but forgot to add the testcase 
that was useful while making the change.   Patch below adds the missing test.

Tested on arm-none-eabi.
Applied to svn trunk.

Paul

[1] http://gcc.gnu.org/ml/gcc-patches/2009-11/msg00129.html

2010-06-11  Paul Brook  <paul@codesourcery.com>
 
	gcc/testsuite/
	* g++.dg/other/arm-neon-1.C: New test.

Patch

Index: gcc/testsuite/g++.dg/other/arm-neon-1.C
===================================================================
--- gcc/testsuite/g++.dg/other/arm-neon-1.C	(revision 0)
+++ gcc/testsuite/g++.dg/other/arm-neon-1.C	(revision 0)
@@ -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);
+}