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

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 27 10:34:25 PDT 2021


RKSimon added a comment.

Having spoken to @spatel offline, I'm going to add a fold for ((x & -x ) - 1) -> (~x & (x - 1)) as well as the ctpop fold - this will require single/multiuse tests for the inner fold (where it shouldn't fold multiuses) and for the ctpop case (where it should always fold to cttz).


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