[PATCH] D122077: [InstCombine] Fold (ctpop(X) == 1) | (X == 0) into ctpop(X) < 2

Hirochika Matsumoto via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sat Mar 26 11:10:30 PDT 2022


hkmatsumoto added a comment.

In D122077#3405085 <https://reviews.llvm.org/D122077#3405085>, @spatel wrote:

> A few changes for tests suggested inline.
>
> There might be some generalization of ctpop analysis that we can make as a follow-up patch.
> For example, I was looking at a "wrong predicate" combination and noticed that we miss possible optimizations like this:
> https://alive2.llvm.org/ce/z/RRk_d9

Very interesting! I'll look into it and (try to) send a follow-up PR.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D122077



More information about the cfe-commits mailing list