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

Craig Topper via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sat Mar 19 14:03:07 PDT 2022


craig.topper added inline comments.


================
Comment at: llvm/test/Transforms/InstCombine/icmp-or.ll:382
+  ret i1 %5
+}
+
----------------
RKSimon wrote:
> What about if the ctpop has multi uses?
The ctpop isn't being changed. Does it matter if it has more uses?

What is interesting is if the (icmp eq (ctpop(x)), 1) has another user other than the or.


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