[Bug middle-end/24912] [4.1/4.2 Regression] m68k build failure: ICE: in reload_cse_simplify_operands
------- Comment #13 from amylaar at gcc dot gnu dot org 2006-01-31 16:28 -------
(In reply to comment #9)
> Subject: Bug 24912
>
> Author: hp
> Date: Sat Nov 19 21:56:17 2005
> New Revision: 107231
>
> URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=107231
> Log:
> PR middle-end/24912
> PR middle-end/24750
> * reload.c (find_reloads_address_1): Mention dependency on
> gen_reload.
> * reload1.c (gen_reload): For IN with an unary operation, try
> moving inner expression to OUT if trivial SET is not valid.
> Confirm that the result is valid. Move common code block into...
> (emit_insn_if_valid_for_reload): New function.
>
> Modified:
> trunk/gcc/ChangeLog
> trunk/gcc/reload.c
> trunk/gcc/reload1.c
>
This patch is incorrect, and has caused PR middle-end/25335:
> + insn = emit_insn (insn);
> + code = recog_memoized (insn);
This test is not valid because subst_reload is called only after
emit_reload_insns.
> + /* If that failed, move the inner operand to the reload
> + register, and try the same unop with the inner expression
> + replaced with the reload register. */
> + op1 = XEXP (in, 0);
This ignores any replacements scheduled for &XEXP (in, 0) .
As a result, addressing modes with side effects can be duplicated.
In the test case for middle-end/25335, the patch for middle-end/24750
has registered such a replacement.
A possible solution would be calling subst_reloads before emit_reload_insns,
although it will require careful checking if this will work properly for all
the things that subst_reload does.
--
amylaar at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |joern dot rennecke at st dot
| |com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24912
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
Reply to: