This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] Don't try to reload match_operator
- From: "Ulrich Weigand" <uweigand at de dot ibm dot com>
- To: rearnsha at arm dot com (Richard Earnshaw)
- Cc: Richard dot Earnshaw at buzzard dot freeserve dot co dot uk (Richard Earnshaw), gcc-patches at gcc dot gnu dot org (GCC Patches), bernds at codesourcery dot com (bernds at codesourcery dot com)
- Date: Mon, 19 Sep 2011 17:53:31 +0200 (CEST)
- Subject: Re: [patch] Don't try to reload match_operator
Richard Earnshaw wrote:
> On 19/09/11 15:14, Ulrich Weigand wrote:
> > So it seems to me that for match_operator operands, the
> > goal_alternative_win flag should always be true ...
> >
> > Can you find out why this isn't true in your case?
>
> Hmm, I think it must be because of this:
>
> /* If the operand is a SUBREG, extract
> the REG or MEM (or maybe even a constant) within.
> (Constants can occur as a result of reg_equiv_constant.) */
>
> while (GET_CODE (operand) == SUBREG)
> {
> ...
> force_reload = 1;
> }
Ah, right. Note that immediately before this "while" we have:
/* If the predicate accepts a unary operator, it means that
we need to reload the operand, but do not do this for
match_operator and friends. */
if (UNARY_P (operand) && *p != 0)
operand = XEXP (operand, 0);
The "... but do not do this for match_operator and friends" part is
implemented by the "*p != 0" check here. It seems we need the same
check for the SUBREG test.
Bye,
Ulrich
--
Dr. Ulrich Weigand
GNU Toolchain for Linux on System z and Cell BE
Ulrich.Weigand@de.ibm.com