This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: RTL alternative selection question
- From: Segher Boessenkool <segher at kernel dot crashing dot org>
- To: Andrew Stubbs <andrew_stubbs at mentor dot com>
- Cc: GCC Development <gcc at gcc dot gnu dot org>
- Date: Mon, 23 Sep 2019 09:15:17 -0500
- Subject: Re: RTL alternative selection question
- References: <1a7febb4-197e-eca7-4fcf-99bf5cb8bdf6@mentor.com>
On Mon, Sep 23, 2019 at 11:56:27AM +0100, Andrew Stubbs wrote:
> [(set (match_operand:DI 0 "register_operand" "=Sg,v")
> (ashift:DI
> (match_operand:DI 1 "gcn_alu_operand" " Sg,v")
> (match_operand:SI 2 "gcn_alu_operand" " Sg,v")))
> (clobber (match_scratch:BI 3 "=cs,X"))]
> Unfortunately, the compiler (almost?) exclusively selects the second
> alternative, even when this means moving the values from one register
> file to the other, and then back again.
>
> The problem is that the scalar instruction clobbers the CC register,
> which results in a "reject++" for that alternative in the LRA dump.
What kind of reject? It prints a reason, too.
Maybe we should make a macro/hook to never do that for your target, for
those flags registers anyway.
Segher