re PR target/47553 (ARM neon vld1q_lane_u8 & co. don't accept lanes >= 8)
authorRichard Sandiford <richard.sandiford@linaro.org>
Wed, 23 Mar 2011 09:57:26 +0000 (09:57 +0000)
committerRichard Sandiford <rsandifo@gcc.gnu.org>
Wed, 23 Mar 2011 09:57:26 +0000 (09:57 +0000)
gcc/
PR target/47553
* config/arm/predicates.md (neon_lane_number): Accept 0..15.

gcc/testsuite/
PR target/47553
* gcc.target/arm/neon-vld-1.c: New test.

From-SVN: r171344

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

index 14f8008214ca0dfa76613f8edb7e0742877941f1..fb754ab629ba5be80078d9900d5abcfb649cbb1a 100644 (file)
@@ -1,3 +1,8 @@
+2011-03-23  Richard Sandiford  <richard.sandiford@linaro.org>
+
+       PR target/47553
+       * config/arm/predicates.md (neon_lane_number): Accept 0..15.
+
 2011-03-23  Richard Sandiford  <richard.sandiford@linaro.org>
 
        * optabs.h (emit_unop_insn, maybe_emit_unop_insn): Change insn code
index 399938fbc2933a3b732369a8a385181d690acf12..40ce1f3c8e9251eccaf9565c4efda62be00a1bbb 100644 (file)
 ;; TODO: We could check lane numbers more precisely based on the mode.
 (define_predicate "neon_lane_number"
   (and (match_code "const_int")
-       (match_test "INTVAL (op) >= 0 && INTVAL (op) <= 7")))
+       (match_test "INTVAL (op) >= 0 && INTVAL (op) <= 15")))
 ;; Predicates for named expanders that overlap multiple ISAs.
 
 (define_predicate "cmpdi_operand"
index 8bc06037175d9e67f59e25cd16ffb88db4b3ecde..31896e2e0d041cfd93231c399ec4b70bc88e64bf 100644 (file)
@@ -1,3 +1,8 @@
+2011-03-23  Richard Sandiford  <richard.sandiford@linaro.org>
+
+       PR target/47553
+       * gcc.target/arm/neon-vld-1.c: New test.
+
 2011-03-23  Eric Botcazou  <ebotcazou@adacore.com>
 
        * gnat.dg/array14.ad[sb]: New test.
diff --git a/gcc/testsuite/gcc.target/arm/neon-vld-1.c b/gcc/testsuite/gcc.target/arm/neon-vld-1.c
new file mode 100644 (file)
index 0000000..f6bf691
--- /dev/null
@@ -0,0 +1,13 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target arm_neon_ok } */
+/* { dg-options "-O1" } */
+/* { dg-add-options arm_neon } */
+
+#include <arm_neon.h>
+
+uint8x16_t
+foo (uint8_t *a, uint8x16_t b)
+{
+  vst1q_lane_u8 (a, b, 14);
+  return vld1q_lane_u8 (a + 0x100, b, 15);
+}