[PATCH] i386: Add combine splitters to allow combining multiple insns into reg1 = const; reg2 = rotate (reg1, reg3 & cst) [PR96226]

Uros Bizjak ubizjak@gmail.com
Fri Dec 4 17:42:56 GMT 2020


On Fri, Dec 4, 2020 at 6:41 PM Jakub Jelinek <jakub@redhat.com> wrote:
>
> On Fri, Dec 04, 2020 at 06:37:02PM +0100, Uros Bizjak wrote:
> > > + "(INTVAL (operands[3]) & (GET_MODE_BITSIZE (<MODE>mode) - 1))
> > > +   == GET_MODE_BITSIZE (<MODE>mode) - 1"
> > > + [(set (match_dup 4) (match_dup 1))
> > > +  (set (match_dup 0)
> > > +       (any_rotate:SWI48 (match_dup 4)
> > > +                        (subreg:QI
> > > +                          (and:SI (match_dup 2) (match_dup 3)) 0)))]
> >
> > Don't we need
> >
> >    (clobber (reg:CC FLAGS_REG))]
> >
> > here? (or is this one of the combine splitter peculiarities?)
>
> I was trying that first, but it didn't work.  Without the
> clobber it actually works right, we don't have the rotate insn with the
> masking and no clobber, so in the end combiner does add the clobber there
> (or would fail it the clobber couldn't be added).

I was not aware of that detail ...

The patch is OK.

Thanks,
Uros.


More information about the Gcc-patches mailing list