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

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 11 09:29:08 PDT 2018


spatel accepted this revision.
spatel added a comment.
This revision is now accepted and ready to land.

LGTM.



================
Comment at: lib/Transforms/InstCombine/InstCombineCompares.cpp:2873
+/// Folds:
+///   x & (-1 >> y) == x    to    x u<= (-1 >> y)
+/// The Mask can be a constant, too.
----------------
Nit: make the formula up here more general and then put the specific formulas within the 'switch'.


Repository:
  rL LLVM

https://reviews.llvm.org/D49179





More information about the llvm-commits mailing list