[PATCH] D76568: [InstCombine] Add CTPOP -> CTTZ simplifications (PR43513)

Dávid Bolvanský via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Mar 22 17:10:56 PDT 2020


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

Looks good



================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp:1340
+    auto *Cttz = IC.Builder.CreateCall(F, {X, IC.Builder.getFalse()});
+    auto *Bw = Constant::getIntegerValue(Ty, APInt(BitWidth, BitWidth));
+    return IC.replaceInstUsesWith(II, IC.Builder.CreateSub(Bw, Cttz));
----------------
ConstantInt::get?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D76568





More information about the llvm-commits mailing list