[PATCH] D101802: [InstCombine] ctpop(X) ^ ctpop(Y) & 1 --> ctpop(X^Y) & 1 (PR50094)

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 4 04:01:43 PDT 2021


RKSimon accepted this revision.
RKSimon added a comment.
This revision is now accepted and ready to land.

LGTM with one minor



================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp:227
+        match(I->getOperand(1), m_Intrinsic<Intrinsic::ctpop>(m_Value(RHS)))) {
+      // ctpop(X) ^ ctpop(Y) & 1 --> ctpop(X^Y) & 1
+      IRBuilderBase::InsertPointGuard Guard(Builder);
----------------
```
// (ctpop(X) ^ ctpop(Y)) & 1 --> ctpop(X^Y) & 1
```


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D101802



More information about the llvm-commits mailing list