Merge lp:~rsandifo/gcc-linaro/lp-710623 into lp:gcc-linaro/4.6

Proposed by Richard Sandiford
Status: Merged
Merged at revision: 106723
Proposed branch: lp:~rsandifo/gcc-linaro/lp-710623
Merge into: lp:gcc-linaro/4.6
Diff against target: 67 lines (+42/-3)
3 files modified
ChangeLog.linaro (+12/-0)
gcc/config/arm/arm.c (+6/-3)
gcc/testsuite/gcc.target/arm/neon-modes-2.c (+24/-0)
To merge this branch: bzr merge lp:~rsandifo/gcc-linaro/lp-710623
Reviewer Review Type Date Requested Status
Linaro Toolchain Developers Pending
Review via email: mp+48296@code.launchpad.net

Description of the change

Posted upstream as:

http://gcc.gnu.org/ml/gcc-patches/2011-01/msg02266.html

However, because the bug isn't a regression, the patch isn't
suitable for FSF 4.6 at this stage. There's also little real
chance of an upstream review until Richard gets back from
sabbatical.

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added file 'ChangeLog.linaro'
2--- ChangeLog.linaro 1970-01-01 00:00:00 +0000
3+++ ChangeLog.linaro 2011-02-02 11:26:02 +0000
4@@ -0,0 +1,12 @@
5+2011-02-02 Richard Sandiford <richard.sandiford@linaro.org>
6+
7+ gcc/
8+ PR target/47551
9+ * config/arm/arm.c (coproc_secondary_reload_class): Handle
10+ structure modes. Don't check neon_vector_mem_operand for
11+ vector or structure modes.
12+
13+ gcc/testsuite/
14+ PR target/47551
15+ * gcc.target/arm/neon-modes-2.c: New test.
16+
17
18=== modified file 'gcc/config/arm/arm.c'
19--- gcc/config/arm/arm.c 2010-12-22 01:42:20 +0000
20+++ gcc/config/arm/arm.c 2011-02-02 11:26:02 +0000
21@@ -9079,11 +9079,14 @@
22 return GENERAL_REGS;
23 }
24
25+ /* The neon move patterns handle all legitimate vector and struct
26+ addresses. */
27 if (TARGET_NEON
28+ && MEM_P (x)
29 && (GET_MODE_CLASS (mode) == MODE_VECTOR_INT
30- || GET_MODE_CLASS (mode) == MODE_VECTOR_FLOAT)
31- && neon_vector_mem_operand (x, 0))
32- return NO_REGS;
33+ || GET_MODE_CLASS (mode) == MODE_VECTOR_FLOAT
34+ || VALID_NEON_STRUCT_MODE (mode)))
35+ return NO_REGS;
36
37 if (arm_coproc_mem_operand (x, wb) || s_register_operand (x, mode))
38 return NO_REGS;
39
40=== added file 'gcc/testsuite/gcc.target/arm/neon-modes-2.c'
41--- gcc/testsuite/gcc.target/arm/neon-modes-2.c 1970-01-01 00:00:00 +0000
42+++ gcc/testsuite/gcc.target/arm/neon-modes-2.c 2011-02-02 11:26:02 +0000
43@@ -0,0 +1,24 @@
44+/* { dg-do compile } */
45+/* { dg-require-effective-target arm_neon_ok } */
46+/* { dg-options "-O1" } */
47+/* { dg-add-options arm_neon } */
48+
49+#include "arm_neon.h"
50+
51+#define SETUP(A) x##A = vld3_u32 (ptr + A * 0x20)
52+#define MODIFY(A) x##A = vld3_lane_u32 (ptr + A * 0x20 + 0x10, x##A, 1)
53+#define STORE(A) vst3_u32 (ptr + A * 0x20, x##A)
54+
55+#define MANY(A) A (0), A (1), A (2), A (3), A (4), A (5)
56+
57+void
58+bar (uint32_t *ptr, int y)
59+{
60+ uint32x2x3_t MANY (SETUP);
61+ int *x = __builtin_alloca (y);
62+ int z[0x1000];
63+ foo (x, z);
64+ MANY (MODIFY);
65+ foo (x, z);
66+ MANY (STORE);
67+}

Subscribers

People subscribed via source and target branches