[PATCH] D142253: [InstCombine] Transform ctpop(Pow2) -> icmp ne Pow2, 0

Noah Goldstein via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 20 13:38:46 PST 2023


goldstein.w.n created this revision.
Herald added a subscriber: hiraditya.
Herald added a project: All.
goldstein.w.n requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

This makes folding to 0/1 later on easier and regardless `icmp ne` is
'probably' faster on most targets (especially for vectors).


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D142253

Files:
  llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
  llvm/test/Transforms/InstCombine/ctpop-pow2.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D142253.490966.patch
Type: text/x-patch
Size: 5772 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230120/e7158476/attachment.bin>


More information about the llvm-commits mailing list