This makes folding to 0/1 later on easier and regardless icmp ne is
'probably' faster on most targets (especially for vectors).
Details
Details
- Reviewers
majnemer spatel nikic - Commits
- rGc9755d80a689: Transform ctpop(Pow2) -> icmp ne Pow2, 0
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp | ||
---|---|---|
677 | genrally -> generally |
Comment Actions
LGTM
llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp | ||
---|---|---|
675 | If the new pattern reliably subsumes this one, we should drop it in a followup. |
llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp | ||
---|---|---|
675 |
Got it. I test removing it but remembered seeing some differences but didn't investigate deeply. I can add a TODO before i commit? |
llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp | ||
---|---|---|
675 | Sure, that's fine. |
If the new pattern reliably subsumes this one, we should drop it in a followup.