[PATCH] D45173: [InstCombine] Recognize idioms for ctpop and ctlz
Krzysztof Parzyszek via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 3 14:04:38 PDT 2018
kparzysz marked 3 inline comments as done.
kparzysz added inline comments.
================
Comment at: lib/Transforms/AggressiveInstCombine/BitCountCombine.cpp:73
+ }
+ if (!APInt::isSameValue(M, *P))
+ return nullptr;
----------------
craig.topper wrote:
> APInt::isSameValue is most useful when the APInts have different widths. Is that the case here? If not we should just use operator==
Yes, this can legitimately happen.
Repository:
rL LLVM
https://reviews.llvm.org/D45173
More information about the llvm-commits
mailing list