re PR rtl-optimization/61215 (ICE in gen_add2_insn, at optabs.c:4718 when building wine-1.7.19)

2014-05-22  Vladimir Makarov  <vmakarov@redhat.com>

	PR rtl-optimization/61215
	* lra-elelimination.c (lra_eliminate_regs_1): Don't use
	simplify_gen_subreg until final substitution.

From-SVN: r210838
This commit is contained in:
Vladimir Makarov 2014-05-23 01:52:01 +00:00 committed by Vladimir Makarov
parent ea9364db15
commit b17ec42d4c
2 changed files with 16 additions and 0 deletions

View File

@ -1,3 +1,9 @@
2014-05-22 Vladimir Makarov <vmakarov@redhat.com>
PR rtl-optimization/61215
* lra-elelimination.c (lra_eliminate_regs_1): Don't use
simplify_gen_subreg until final substitution.
2014-05-23 Alan Modra <amodra@gmail.com>
PR target/61231

View File

@ -565,6 +565,16 @@ lra_eliminate_regs_1 (rtx insn, rtx x, enum machine_mode mem_mode,
alter_subreg (&x, false);
return x;
}
else if (! subst_p)
{
/* LRA can transform subregs itself. So don't call
simplify_gen_subreg until LRA transformations are
finished. Function simplify_gen_subreg can do
non-trivial transformations (like truncation) which
might make LRA work to fail. */
SUBREG_REG (x) = new_rtx;
return x;
}
else
return simplify_gen_subreg (GET_MODE (x), new_rtx,
GET_MODE (new_rtx), SUBREG_BYTE (x));