[PATCH] D47681: [DAGCombiner] Bug 31275- Extract a shift from a constant mul or udiv if a rotate can be formed

Sam Conrad via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Jun 17 18:27:02 PDT 2018


sameconrad added a comment.

In https://reviews.llvm.org/D47681#1134801, @lebedev.ri wrote:

> In https://reviews.llvm.org/D47681#1131982, @sameconrad wrote:
>
> > In https://reviews.llvm.org/D47681#1131359, @lebedev.ri wrote:
> >
> > > BTW, that reminds me.
> > >  @sameconrad while you are looking at rotates in backend, can you please also check (at least add tests,
> > >  if there aren't any yet) that backend properly handles the cases where `mul`/`div` were transformed into shifts?
> >
> >
> >
> >
> > > I can take a look at that, will do that in a separate patch.
> >
> > Actually nvm, I see what you're saying.  I'll try to update this patch in a bit for that case.
>
>
> You can refer to the tests in https://reviews.llvm.org/D48229 for the examples of patterns that are related.


Updated the patch to handle extracting from a shl/srl.
For handling srl+shl->bitmask cases I'd prefer to do a follow-up patch since I need a bit more time to look at it.


https://reviews.llvm.org/D47681





More information about the llvm-commits mailing list