This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: RTL alternative selection question


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]