[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 08:53:25 PDT 2018


lebedev.ri updated this revision to Diff 155015.
lebedev.ri marked 4 inline comments as done.
lebedev.ri added a comment.

Address @spatel's review notes.

In https://reviews.llvm.org/D49179#1158760, @spatel wrote:

> I'm not too worried about the missing fold in foldLogOpOfMaskedICmps(). That's a complex mess, so not surprising that it has logic holes. I've wondered if we could rewrite that using ranges to simplify that code.


That's, relieving to know!
I have looked a bit more, and i'm not sure what goes wrong,
so one regression can slip, that'd be great.


Repository:
  rL LLVM

https://reviews.llvm.org/D49179

Files:
  include/llvm/IR/PatternMatch.h
  lib/Transforms/InstCombine/InstCombineCompares.cpp
  test/Transforms/InstCombine/canonicalize-constant-low-bit-mask-and-icmp-eq-to-icmp-ule.ll
  test/Transforms/InstCombine/canonicalize-low-bit-mask-and-icmp-eq-to-icmp-ule.ll
  test/Transforms/InstCombine/icmp-logical.ll
  test/Transforms/InstCombine/icmp-mul-zext.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D49179.155015.patch
Type: text/x-patch
Size: 12035 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180711/ab5c5905/attachment.bin>


More information about the llvm-commits mailing list