aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/arm/arm.c
diff options
context:
space:
mode:
authorRichard Sandiford <richard.sandiford@linaro.org>2011-03-30 15:00:44 +0000
committerRichard Sandiford <rsandifo@gcc.gnu.org>2011-03-30 15:00:44 +0000
commit159b81b00a8683b5fe7efdbaff73391a8d9e2d96 (patch)
tree4185ae9692965315079941f2fbf556751245f6cc /gcc/config/arm/arm.c
parenta6217191562708a588883aefb49cd1a3722e105a (diff)
downloadgcc-159b81b00a8683b5fe7efdbaff73391a8d9e2d96.zip
gcc-159b81b00a8683b5fe7efdbaff73391a8d9e2d96.tar.gz
gcc-159b81b00a8683b5fe7efdbaff73391a8d9e2d96.tar.bz2
re PR target/47551 (ICE when reloading neon registers from out-of-range offsets)
gcc/ PR target/47551 * config/arm/arm.c (coproc_secondary_reload_class): Handle structure modes. Don't check neon_vector_mem_operand for vector or structure modes. gcc/testsuite/ PR target/47551 * gcc.target/arm/neon-modes-2.c: New test. From-SVN: r171730
Diffstat (limited to 'gcc/config/arm/arm.c')
-rw-r--r--gcc/config/arm/arm.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c
index de9e6f9..57fe96c 100644
--- a/gcc/config/arm/arm.c
+++ b/gcc/config/arm/arm.c
@@ -9152,11 +9152,14 @@ coproc_secondary_reload_class (enum machine_mode mode, rtx x, bool wb)
return GENERAL_REGS;
}
+ /* The neon move patterns handle all legitimate vector and struct
+ addresses. */
if (TARGET_NEON
+ && MEM_P (x)
&& (GET_MODE_CLASS (mode) == MODE_VECTOR_INT
- || GET_MODE_CLASS (mode) == MODE_VECTOR_FLOAT)
- && neon_vector_mem_operand (x, 0))
- return NO_REGS;
+ || GET_MODE_CLASS (mode) == MODE_VECTOR_FLOAT
+ || VALID_NEON_STRUCT_MODE (mode)))
+ return NO_REGS;
if (arm_coproc_mem_operand (x, wb) || s_register_operand (x, mode))
return NO_REGS;