aboutsummaryrefslogtreecommitdiff
path: root/gcc/simplify-rtx.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2016-04-13 14:26:26 +0200
committerJakub Jelinek <jakub@gcc.gnu.org>2016-04-13 14:26:26 +0200
commit3d3f9e7e6980d6d226b3a11e7ff0256158116b04 (patch)
treebe300b9024e7162275964cad1fdb901a5e2ac0f0 /gcc/simplify-rtx.c
parent12de22454259eae414bcaa0c3edd38ed0e40cf77 (diff)
downloadgcc-3d3f9e7e6980d6d226b3a11e7ff0256158116b04.zip
gcc-3d3f9e7e6980d6d226b3a11e7ff0256158116b04.tar.gz
gcc-3d3f9e7e6980d6d226b3a11e7ff0256158116b04.tar.bz2
re PR debug/70628 (ICE in get_reg_rtx, at emit-rtl.c:1025)
PR debug/70628 * rtl.h (convert_memory_address_addr_space_1): New prototype. * explow.c (convert_memory_address_addr_space_1): No longer static, add NO_EMIT argument and don't call convert_modes if true, pass it down recursively, remove break after return. (convert_memory_address_addr_space): Adjust caller. * simplify-rtx.c (simplify_unary_operation_1): Call convert_memory_address_addr_space_1 instead of convert_memory_address, if it returns NULL, don't simplify. * gcc.dg/torture/pr70628.c: New test. From-SVN: r234933
Diffstat (limited to 'gcc/simplify-rtx.c')
-rw-r--r--gcc/simplify-rtx.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/gcc/simplify-rtx.c b/gcc/simplify-rtx.c
index b1b9936..fdc4b36 100644
--- a/gcc/simplify-rtx.c
+++ b/gcc/simplify-rtx.c
@@ -1482,7 +1482,14 @@ simplify_unary_operation_1 (enum rtx_code code, machine_mode mode, rtx op)
&& REG_POINTER (SUBREG_REG (op))
&& GET_MODE (SUBREG_REG (op)) == Pmode))
&& !targetm.have_ptr_extend ())
- return convert_memory_address (Pmode, op);
+ {
+ temp
+ = convert_memory_address_addr_space_1 (Pmode, op,
+ ADDR_SPACE_GENERIC, false,
+ true);
+ if (temp)
+ return temp;
+ }
#endif
break;
@@ -1604,7 +1611,14 @@ simplify_unary_operation_1 (enum rtx_code code, machine_mode mode, rtx op)
&& REG_POINTER (SUBREG_REG (op))
&& GET_MODE (SUBREG_REG (op)) == Pmode))
&& !targetm.have_ptr_extend ())
- return convert_memory_address (Pmode, op);
+ {
+ temp
+ = convert_memory_address_addr_space_1 (Pmode, op,
+ ADDR_SPACE_GENERIC, false,
+ true);
+ if (temp)
+ return temp;
+ }
#endif
break;