[PATCH] D122757: [InstCombine] Fold (ctpop(X) == N) || (X != 0) into X != 0 where N > 0
Sanjay Patel via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 30 13:27:50 PDT 2022
spatel added a comment.
If we are not creating a new value in a transformation (only returning an existing value or constant), we usually prefer to add that fold (and tests) to "InstSimplify".
Note that you can use "llvm.assume" with Alive2 to create a more general proof instead of using a specific constant:
https://alive2.llvm.org/ce/z/vcY7_s
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D122757/new/
https://reviews.llvm.org/D122757
More information about the llvm-commits
mailing list