This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH]: Fix PR middle-end/56382 -- Only move MODE_COMPLEX_FLOAT by parts if we can create pseudos
- From: Eric Botcazou <ebotcazou at adacore dot com>
- To: John David Anglin <dave dot anglin at bell dot net>
- Cc: gcc-patches at gcc dot gnu dot org, Steven Bosscher <stevenb dot gcc at gmail dot com>
- Date: Fri, 30 Aug 2013 12:38:58 +0200
- Subject: Re: [PATCH]: Fix PR middle-end/56382 -- Only move MODE_COMPLEX_FLOAT by parts if we can create pseudos
- Authentication-results: sourceware.org; auth=none
- References: <BLU0-SMTP2690D4975D21F5B1DC549397540 at phx dot gbl> <CABu31nO4UDdKTLKW=-14SqUpvXP06jV4tMeem5RsyzNG9YkfVA at mail dot gmail dot com> <BLU0-SMTP1902D63F11B9BF4E80626397340 at phx dot gbl>
> As you say, some other check might be more appropriate to determine
> whether a call to gen_reg_rtx might be needed in
> emit_move_complex_parts.
> For the PA, it would be something like "GET_MODE_BITSIZE (mode) >
> BITS_PER_WORD".
> But, we still need to check can_create_pseudo_p as we probably still
> want to use
> emit_move_complex_parts before reload.
Let's avoid trying to do something general since this seems to be really a
corner case. Can't we simply deal with hard registers specially?
/* Move floating point as parts if splitting is easy. */
if (GET_MODE_CLASS (mode) == MODE_COMPLEX_FLOAT
&& optab_handler (mov_optab, GET_MODE_INNER (mode)) != CODE_FOR_nothing
&& !(REG_P (x)
&& HARD_REGISTER_P (x)
&& hard_regno_nregs[REGNO(x)][mode] == 1)
&& !(REG_P (y)
&& HARD_REGISTER_P (y)
&& hard_regno_nregs[REGNO(y)][mode] == 1))
try_int = false;
--
Eric Botcazou