[PATCH] D110488: [InstCombine] Fold ctpop((x & -x ) - 1) -> cttz(x, false) (PR51784)

Dávid Bolvanský via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Sep 25 13:31:00 PDT 2021


xbolva00 added a comment.

In D110488#3022683 <https://reviews.llvm.org/D110488#3022683>, @RKSimon wrote:

> An alternative would be to decide if (~x & (x - 1)) or ((x & -x ) - 1) should be the canonical pattern?
>
> https://alive2.llvm.org/ce/z/WA_cmX

Yeah I was thinking about some more general pattern too. @spatel?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D110488



More information about the llvm-commits mailing list