[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 10:01:21 PDT 2018


lebedev.ri added a comment.

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?


Repository:
  rL LLVM

https://reviews.llvm.org/D49179





More information about the llvm-commits mailing list