On Mon, Sep 23, 2019 at 03:39:08PM +0100, Andrew Stubbs wrote:
> On 23/09/2019 15:15, Segher Boessenkool wrote:
> >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.
> 
>      0 Non input pseudo reload: reject++
> 
> >Maybe we should make a macro/hook to never do that for your target, for
> >those flags registers anyway.
> 
> That wouldn't be horrible. I suppose I could look at doing that. Any 
> suggestions how it should or should not work?

Pass the register class or constraint or something like that to the hook,
then based on what the hook returns, either or not do the reject?  So your
hook would special-case SCC_CONDITIONAL_REG, maybe a few more similar ones
(those are confusing names btw, _REG but they are register classes).


Segher

Reply via email to