On Fri, 2025-12-26 at 17:02 -0700, Jeffrey Law wrote:
> On 12/7/2025 10:11 PM, Oleg Endo wrote:
> > On Fri, 2025-12-05 at 22:05 -0700, Jeff Law wrote:
> > > Here's an update that adds a pattern to the SH port to recognize the
> > > slightly different RTL presented for this scenario. Essentially it just
> > > needs to recognize (xor (rotate)) for a count of 1 and flipping the low
> > > bit.
> > >
> > > OK for the trunk?
> > >
> > Can you please write this ...
> >
> > +{
> > + operands[3] = gen_rtx_GE (SImode, operands[1], const0_rtx);
> > + sh_split_treg_set_expr (operands[3], curr_insn);
> > + operands[3] = get_t_reg_rtx ();
> > +})
> >
> > .. as ...
> >
> > +{
> > + sh_split_treg_set_expr (
> > + gen_rtx_GE (SImode, operands[1], const0_rtx), curr_insn);
> > + operands[3] = get_t_reg_rtx ();
> > +})
> >
> > ( or whatever the appropriate line break / formatting would be, but the
> > point being not mis-using operands[3] as a local tmp var )
>
> We can just create a temporary. That's generally preferable to making
> it a call argument, particularly for debugging. So..
>
>
> rtx t = gen_rtx_GE (...);
> sh_split_treg_set_expr (t, curr_insn);
> operands[3] = get_t_reg_rtx ();
>
> Or something close to that. Are the SH bits OK in that kind of form?
>
Yes, that's fine, too. Thanks!
Best regards,
Oleg Endo