aboutsummaryrefslogtreecommitdiff
path: root/gcc/reload1.c
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2012-09-21 11:06:51 +0000
committerEric Botcazou <ebotcazou@gcc.gnu.org>2012-09-21 11:06:51 +0000
commitb383e25548a5c06cb096cad9571031b98f074f00 (patch)
tree4c215542ecfa6dd4a462389de3a15cd013b15413 /gcc/reload1.c
parent88a4c78be1f44b8918517382b628f2062c30c834 (diff)
downloadgcc-b383e25548a5c06cb096cad9571031b98f074f00.zip
gcc-b383e25548a5c06cb096cad9571031b98f074f00.tar.gz
gcc-b383e25548a5c06cb096cad9571031b98f074f00.tar.bz2
re PR rtl-optimization/54290 (wrong code at -O2 with large offset)
PR rtl-optimization/54290 PR rtl-optimization/54644 * reload1.c (choose_reload_regs): Fix thinko in previous change. From-SVN: r191609
Diffstat (limited to 'gcc/reload1.c')
-rw-r--r--gcc/reload1.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/gcc/reload1.c b/gcc/reload1.c
index 66ae808..c4c1426 100644
--- a/gcc/reload1.c
+++ b/gcc/reload1.c
@@ -6991,16 +6991,17 @@ choose_reload_regs (struct insn_chain *chain)
If we succeeded removing some reload and we are doing a preliminary
pass just to remove such reloads, make another pass, since the
removal of one reload might allow us to inherit another one. */
- else if (pass
- && rld[r].in
+ else if (rld[r].in
&& rld[r].out != rld[r].in
&& remove_address_replacements (rld[r].in))
- pass = 2;
+ {
+ if (pass)
+ pass = 2;
+ }
#ifdef SECONDARY_MEMORY_NEEDED
/* If we needed a memory location for the reload, we also have to
remove its related reloads. */
- else if (pass
- && rld[r].in
+ else if (rld[r].in
&& rld[r].out != rld[r].in
&& (tem = replaced_subreg (rld[r].in), REG_P (tem))
&& REGNO (tem) < FIRST_PSEUDO_REGISTER
@@ -7009,7 +7010,10 @@ choose_reload_regs (struct insn_chain *chain)
&& remove_address_replacements
(get_secondary_mem (tem, rld[r].inmode, rld[r].opnum,
rld[r].when_needed)))
- pass = 2;
+ {
+ if (pass)
+ pass = 2;
+ }
#endif
}
}