diff options
author | Alan Modra <amodra@gmail.com> | 2016-02-14 12:07:40 +1030 |
---|---|---|
committer | Alan Modra <amodra@gcc.gnu.org> | 2016-02-14 12:07:40 +1030 |
commit | ab6e41cb3c9ec47b0dc7dcbf2c85b38980a5ef90 (patch) | |
tree | 4f99dbb06bd95b603d114ce66f9c8f87a902e324 /gcc/reload.c | |
parent | 114e2b5198205e586a2115f4e81f587add87e4db (diff) | |
download | gcc-ab6e41cb3c9ec47b0dc7dcbf2c85b38980a5ef90.zip gcc-ab6e41cb3c9ec47b0dc7dcbf2c85b38980a5ef90.tar.gz gcc-ab6e41cb3c9ec47b0dc7dcbf2c85b38980a5ef90.tar.bz2 |
PRE_INC with invalid hard reg
PR target/68973
* reloads.c (find_reloads_address_1): For pre/post-inc/dec
with an invalid hard reg, reload just the reg not the entire
pre/post-inc/dec address expression.
From-SVN: r233406
Diffstat (limited to 'gcc/reload.c')
-rw-r--r-- | gcc/reload.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/gcc/reload.c b/gcc/reload.c index 6196e63..06426d9 100644 --- a/gcc/reload.c +++ b/gcc/reload.c @@ -5834,14 +5834,16 @@ find_reloads_address_1 (machine_mode mode, addr_space_t as, ? XEXP (x, 0) : reg_equiv_mem (regno)); enum insn_code icode = optab_handler (add_optab, GET_MODE (x)); - if (insn && NONJUMP_INSN_P (insn) && equiv - && memory_operand (equiv, GET_MODE (equiv)) + if (insn && NONJUMP_INSN_P (insn) #if HAVE_cc0 && ! sets_cc0_p (PATTERN (insn)) #endif - && ! (icode != CODE_FOR_nothing - && insn_operand_matches (icode, 0, equiv) - && insn_operand_matches (icode, 1, equiv)) + && (regno < FIRST_PSEUDO_REGISTER + || (equiv + && memory_operand (equiv, GET_MODE (equiv)) + && ! (icode != CODE_FOR_nothing + && insn_operand_matches (icode, 0, equiv) + && insn_operand_matches (icode, 1, equiv)))) /* Using RELOAD_OTHER means we emit this and the reload we made earlier in the wrong order. */ && !reloaded_inner_of_autoinc) |