[PATCH] D89952: [SelectionDAG][X86] Fine tune CTPOP optimizations
Sanjay Patel via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 22 11:53:35 PDT 2020
spatel added a comment.
In D89952#2348102 <https://reviews.llvm.org/D89952#2348102>, @craig.topper wrote:
> @spatel Somewhat related question if InstCombine canonicalizes (x && (x & x-1) ==0) to ctpop x == 1. Does that mean if ctpop isn't legal, the vectorization cost model will return a high cost for the ctpop part?
Yes, that's a gap in the cost model that we don't currently have a good way to solve (AFAIK). We need to consider the cost of the expanded `icmp (ctpop), C` as a whole rather than individual instructions.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D89952/new/
https://reviews.llvm.org/D89952
More information about the llvm-commits
mailing list