From: Jeffrey A Law Date: Wed, 30 Dec 1998 23:14:25 +0000 (+0000) Subject: reload1.c (reload_as_needed): Verify that the insn satisfies its constraints after... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f67c2384cb78c7f241aa3e9ef10e06c916363f9a;p=gcc.git reload1.c (reload_as_needed): Verify that the insn satisfies its constraints after replacing a register... * reload1.c (reload_as_needed): Verify that the insn satisfies its constraints after replacing a register address with an autoincrement address for reload inheritance purposes. From-SVN: r24449 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 2f802535a14..b5bdd3666b0 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,9 @@ Wed Dec 30 23:38:55 1998 Jeffrey A Law (law@cygnus.com) + * reload1.c (reload_as_needed): Verify that the insn satisfies its + constraints after replacing a register address with an autoincrement + address for reload inheritance purposes. + * i386.md (doubleword shifts): Avoid namespace pollution. Wed Dec 30 23:00:28 1998 David O'Brien diff --git a/gcc/reload1.c b/gcc/reload1.c index 39da06d6135..3e5f898d5a7 100644 --- a/gcc/reload1.c +++ b/gcc/reload1.c @@ -4333,9 +4333,31 @@ reload_as_needed (live_known) if (! n) continue; if (n == 1) - n = validate_replace_rtx (reload_reg, - gen_rtx (code, mode, - reload_reg), p); + { + n = validate_replace_rtx (reload_reg, + gen_rtx (code, mode, + reload_reg), + p); + + /* We must also verify that the constraints + are met after the replacement. */ + extract_insn (p); + if (n) + n = constrain_operands (1); + else + break; + + /* If the constraints were not met, then + undo the replacement. */ + if (!n) + { + validate_replace_rtx (gen_rtx (code, mode, + reload_reg), + reload_reg, p); + break; + } + + } break; } if (n == 1)