[PATCH] D122077: [InstCombine] Fold (ctpop(X) == 1) | (X == 0) into ctpop(X) < 2
Joerg Sonnenberger via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 29 03:03:59 PDT 2022
joerg added a comment.
Why is this fold preferable to `(X & (X-1)) == 0`? At least on all architectures without native population count, the binary-and based test is preferable and it might even be better with it.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D122077/new/
https://reviews.llvm.org/D122077
More information about the llvm-commits
mailing list