[PATCH] D122757: [InstCombine] Fold (ctpop(X) == N) || (X != 0) into X != 0 where N > 0

Hirochika Matsumoto via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 31 08:13:47 PDT 2022


hkmatsumoto updated this revision to Diff 419469.
hkmatsumoto added a comment.

- Move change and its test to InstSimplify

- Remove tests whose and/or are replaced with select

This is because InstSimlify/and-or-icmp-* tests does not include such tests, and as far as I tried on goldbot.org simplifyAndOrOfICmps* functions in InstructionSimplify.cpp does not acknowledge select operands to optimize.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D122757

Files:
  llvm/lib/Analysis/InstructionSimplify.cpp
  llvm/test/Transforms/InstCombine/ispow2.ll
  llvm/test/Transforms/InstSimplify/and-or-icmp-ctpop.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D122757.419469.patch
Type: text/x-patch
Size: 6906 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220331/433a654f/attachment.bin>


More information about the llvm-commits mailing list