]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
neon.md (vec_set<mode>_internal): Fix misplaced parenthesis in D-register case.
authorJulian Brown <jules@gcc.gnu.org>
Thu, 5 May 2011 16:12:21 +0000 (16:12 +0000)
committerJulian Brown <jules@gcc.gnu.org>
Thu, 5 May 2011 16:12:21 +0000 (16:12 +0000)
gcc/
* config/arm/neon.md (vec_set<mode>_internal): Fix misplaced
parenthesis in D-register case.

gcc/testsuite/
* gcc.target/arm/neon-vset_lanes8.c: New test.

From-SVN: r173440

gcc/ChangeLog
gcc/config/arm/neon.md
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/arm/neon-vset_lanes8.c [new file with mode: 0644]

index ac97e8278d2b18fd659d111fbcdc8df53869f2e6..012dcc5a68e84308cec0984e6277626ed4207e7f 100644 (file)
@@ -1,4 +1,9 @@
-2010-05-05  Ira Rosen  <ira.rosen@linaro.org>
+2011-05-05  Julian Brown  <julian@codesourcery.com>
+
+       * config/arm/neon.md (vec_set<mode>_internal): Fix misplaced
+       parenthesis in D-register case.
+
+2011-05-05  Ira Rosen  <ira.rosen@linaro.org>
 
        Backport from mainline:
        2011-04-18  Ulrich Weigand  <ulrich.weigand@linaro.org>
index 666910e193a5e1c1f69af170b7327aa5f5f1ee96..58585226040797a4d64cb0290389f3b6cad29539 100644 (file)
           (match_operand:SI 2 "immediate_operand" "i")))]
   "TARGET_NEON"
 {
-  int elt = ffs ((int) INTVAL (operands[2]) - 1);
+  int elt = ffs ((int) INTVAL (operands[2])) - 1;
   if (BYTES_BIG_ENDIAN)
     elt = GET_MODE_NUNITS (<MODE>mode) - 1 - elt;
   operands[2] = GEN_INT (elt);
index 4776422c43caa57328fa84bfa0110f8014f91769..119047e0eee231b75b8928cbe9cd62abd49c2120 100644 (file)
@@ -1,4 +1,8 @@
-2010-05-05  Ira Rosen  <ira.rosen@linaro.org>
+2011-05-05  Julian Brown  <julian@codesourcery.com>
+
+       * gcc.target/arm/neon-vset_lanes8.c: New test.
+
+2011-05-05  Ira Rosen  <ira.rosen@linaro.org>
 
        Backport from mainline:
        2011-04-18  Ulrich Weigand  <ulrich.weigand@linaro.org>
diff --git a/gcc/testsuite/gcc.target/arm/neon-vset_lanes8.c b/gcc/testsuite/gcc.target/arm/neon-vset_lanes8.c
new file mode 100644 (file)
index 0000000..e87102e
--- /dev/null
@@ -0,0 +1,21 @@
+/* Test the `vset_lane_s8' ARM Neon intrinsic.  */
+
+/* { dg-do run } */
+/* { dg-require-effective-target arm_neon_hw } */
+/* { dg-options "-O0" } */
+/* { dg-add-options arm_neon } */
+
+#include "arm_neon.h"
+#include <stdlib.h>
+#include <string.h>
+
+int8x8_t x = { 1, 2, 3, 4, 5, 6, 7, 8 };
+int8x8_t y = { 1, 2, 3, 16, 5, 6, 7, 8 };
+
+int main (void)
+{
+  x = vset_lane_s8 (16, x, 3);
+  if (memcmp (&x, &y, sizeof (x)) != 0)
+    abort();
+  return 0;
+}