[PATCH] D109155: [InstCombine] Fold BW/2+1 tops bits are same pattern

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 7 05:39:11 PDT 2021


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

LGTM



================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp:4503
 
+  // Match icmp eq (trunc (lsr A, BW), (ashr (trunc A), BW-1)), which checks the
+  // top BW/2 + 1 bits are all the same. Create "A >=s INT_MIN && A <=s INT_MAX",
----------------
lsr -> lshr


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D109155/new/

https://reviews.llvm.org/D109155



More information about the llvm-commits mailing list