This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [ia64] [PR target/57491] internal compiler error: in ia64_split_tmode -O2, quadmath
- From: Eric Botcazou <ebotcazou at adacore dot com>
- To: Kirill Yukhin <kirill dot yukhin at gmail dot com>
- Cc: gcc-patches at gcc dot gnu dot org, wilson at tuliptree dot org, sellcey at mips dot com, jtaylor dot debian at gmail dot com
- Date: Fri, 15 Nov 2013 10:51:56 +0100
- Subject: Re: [ia64] [PR target/57491] internal compiler error: in ia64_split_tmode -O2, quadmath
- Authentication-results: sourceware.org; auth=none
- References: <20131107124234 dot GA2459 at msticlxl57 dot ims dot intel dot com>
> diff --git a/gcc/config/ia64/ia64.c b/gcc/config/ia64/ia64.c
> index a128b19..446ee59 100644
> --- a/gcc/config/ia64/ia64.c
> +++ b/gcc/config/ia64/ia64.c
> @@ -1527,12 +1527,19 @@ ia64_split_tmode_move (rtx operands[])
> && reg_overlap_mentioned_p (operands[0], operands[1]))
> {
> rtx base = XEXP (operands[1], 0);
> + rtx first_write = gen_rtx_REG (DImode, REGNO (operands[0]));
> while (GET_CODE (base) != REG)
> base = XEXP (base, 0);
>
> if (REGNO (base) == REGNO (operands[0]))
> - reversed = true;
> - dead = true;
> + {
> + reversed = true;
> + first_write = gen_rtx_REG (DImode, REGNO (operands[0]) + 1);
> + }
> +
> + if (GET_CODE (operands[0]) == REG
> + && reg_overlap_mentioned_p (first_write, operands[1]))
> + dead = true;
> }
> /* Another reason to do the moves in reversed order is if the first
> element of the target register pair is also the second element of
Note that the new "GET_CODE (operands[0]) == REG" check is redundant, since
REGNO (operands[0]) is already accessed before. And instead of generating
very short-lived RTL, you could use refers_to_regno_p instead.
I suspect that the problem reported by Jeff is related to the usage of "dead"
in the REG subcase of the MEM case of ia64_split_tmode. There is a dangling
comment to that effect in ia64_split_tmode_move just above the block.
--
Eric Botcazou