[PATCH] D140666: [InstCombine] combine intersection for inequality icmps

Yingchi Long via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 26 20:01:33 PST 2022


inclyc updated this revision to Diff 485339.
inclyc added a comment.

Assume that `(B & D) & (C ^ E) == 0`, and `(B & D) == D || (B & D) == B`,
transforms:

  (icmp ne (A & B), C) & (icmp ne (A & D), E)
  -> (icmp ne (A & (B&D)), (C&E))

Previous version I forgot the condition `(B & D) == D || (B & D) == B`.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D140666

Files:
  llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
  llvm/test/Transforms/InstCombine/icmp-logical.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D140666.485339.patch
Type: text/x-patch
Size: 3938 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221227/966b3e72/attachment.bin>


More information about the llvm-commits mailing list