This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [lra] patch to revert a code from previous patch.
- From: Richard Sandiford <rdsandiford at googlemail dot com>
- To: Vladimir Makarov <vmakarov at redhat dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 15 Oct 2012 20:10:47 +0100
- Subject: Re: [lra] patch to revert a code from previous patch.
- References: <507C4A38.3000005@redhat.com>
Vladimir Makarov <vmakarov@redhat.com> writes:
> After committing a patch yesterday to implement proposals from a
> review, I found that GCC crashes on SPEC2000 gap. LRA is trying to find
> a mode of operand (const_int 1) in *lea_general_1 insn and can not find
> it as the operand and insn template operand has VOIDmode.
>
> There are still cases when context lookup is necessary to find a mode of
> the operand. So I am reversing the change I did yesterday.
>
> The patch is committed as rev. 192462.
>
> 2012-10-15 Vladimir Makarov <vmakarov@redhat.com>
>
> * lra-int.h (lra_get_mode): Remove.
> * lra-constraints.c (find_mode, get_op_mode): New functions.
> (match_reload): Use get_op_mode instead of lra_get_mode.
> (process_alt_operands, curr_insn_transform): Ditto.
But my objection to this code still stands. It's wrong to assume
that an operand to an rtx has the same mode as the containing rtx.
Please add a testcase that shows the problem.
Richard