re PR middle-end/37053 (ICE in reload_cse_simplify_operands, at postreload.c:395)

PR target/37053
	* reload1.c (reload_as_needed): Use cancel_changes to completely
	undo a failed replacement attempt.

From-SVN: r150626
This commit is contained in:
Ulrich Weigand 2009-08-10 15:34:09 +00:00 committed by Ulrich Weigand
parent ee26a76d35
commit 0159ec792b
2 changed files with 16 additions and 16 deletions

View File

@ -1,3 +1,9 @@
2009-08-10 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
PR target/37053
* reload1.c (reload_as_needed): Use cancel_changes to completely
undo a failed replacement attempt.
2009-08-10 Richard Guenther <rguenther@suse.de>
PR middle-end/41006

View File

@ -4304,31 +4304,25 @@ reload_as_needed (int live_known)
continue;
if (n == 1)
{
n = validate_replace_rtx (reload_reg,
gen_rtx_fmt_e (code,
mode,
reload_reg),
p);
rtx replace_reg
= gen_rtx_fmt_e (code, mode, reload_reg);
validate_replace_rtx_group (reload_reg,
replace_reg, p);
n = verify_changes (0);
/* 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. */
undo the replacement, else confirm it. */
if (!n)
{
validate_replace_rtx (gen_rtx_fmt_e (code,
mode,
reload_reg),
reload_reg, p);
break;
}
cancel_changes (0);
else
confirm_change_group ();
}
break;
}