Commit 0159ec79 by Ulrich Weigand Committed by Ulrich Weigand

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
parent ee26a76d
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> 2009-08-10 Richard Guenther <rguenther@suse.de>
PR middle-end/41006 PR middle-end/41006
......
...@@ -4304,31 +4304,25 @@ reload_as_needed (int live_known) ...@@ -4304,31 +4304,25 @@ reload_as_needed (int live_known)
continue; continue;
if (n == 1) if (n == 1)
{ {
n = validate_replace_rtx (reload_reg, rtx replace_reg
gen_rtx_fmt_e (code, = gen_rtx_fmt_e (code, mode, reload_reg);
mode,
reload_reg), validate_replace_rtx_group (reload_reg,
p); replace_reg, p);
n = verify_changes (0);
/* We must also verify that the constraints /* We must also verify that the constraints
are met after the replacement. */ are met after the replacement. */
extract_insn (p); extract_insn (p);
if (n) if (n)
n = constrain_operands (1); n = constrain_operands (1);
else
break;
/* If the constraints were not met, then /* If the constraints were not met, then
undo the replacement. */ undo the replacement, else confirm it. */
if (!n) if (!n)
{ cancel_changes (0);
validate_replace_rtx (gen_rtx_fmt_e (code, else
mode, confirm_change_group ();
reload_reg),
reload_reg, p);
break;
}
} }
break; break;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment