[PATCH] D15718: Recognize pattern for ctpop in instcombine
Krzysztof Parzyszek via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 3 05:10:38 PST 2016
kparzysz added a comment.
To answer David's question: the main reason why it's here is that after the instruction combiner, the code is transformed in a way that makes the detection of the popcnt pattern more difficult. At this stage, there is some regularity in the IR that can be exploited to check for popcnt patterns of varying widths.
As far as downstream optimizations are involved---this transformation will reduce code size by quite a bit, and any optimization that can be limited by code size could potentially be enabled by this change.
More information about the llvm-commits