On Mon, Mar 23, 2020 at 04:44:56PM +0100, Richard Biener wrote:
> On Mon, Mar 23, 2020 at 4:34 PM Jakub Jelinek <ja...@redhat.com> wrote:
> >
> > On Mon, Mar 23, 2020 at 04:29:12PM +0100, Richard Biener wrote:
> > > I wonder if we can leverage the bswap pass for rotate detection
> > > (see find_bswap_or_nop which matches the symbolic number
> > > against either 1:1 or byte-swapped variants, to be added would be
> > > rotate and shift patterns).
> >
> > That pass can only handle cases where the shift counts are multiple of
> > BITS_PER_UNIT, the whole infrastructure is based on being able to track
> > movements of bytes.
> 
> That's true, but also an artifact of the symbolic number encoding.

I'm pretty new to match.pd and in general to GCC.  Is there something
which speaks against solving this in match.pd?  If so and the bswap pass
is also not the right place, do you have something else in mind?

Reply via email to