[PATCH] D49179: [InstCombine] Fold x & (-1 >> y) == x to x u<= (-1 >> y)

Roman Lebedev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 11 11:01:32 PDT 2018


lebedev.ri added a comment.

In https://reviews.llvm.org/D49179#1158957, @lebedev.ri wrote:

> In https://reviews.llvm.org/D49179#1158930, @spatel wrote:
>
> > LGTM.
>
>
> Thank you for such speedy review!
>
> I'm wondering, what about the signed case?
>  https://godbolt.org/g/WvWX13
>  https://godbolt.org/g/DM7XA4
>  https://rise4fun.com/Alive/Qslx (check that 25 high bits are either all-ones, or all-zeros)
>
> Can we do this in instcombine?
>  Or not, given that we were disabling some bit-fiddling transforms lately?


Actually, not sure that is any better, will leave that for now.
Though the reverse transform might be a good thing for dagcombine.


Repository:
  rL LLVM

https://reviews.llvm.org/D49179





More information about the llvm-commits mailing list