[llvm] [AggressiveInstCombine] Match the pattern and generate ctlz function call (PR #177110)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 11 02:47:27 PST 2026


nikic wrote:

> But the files used for comparison don't have pattern as during preprocessing of source code, a builtin call was used instead.

I think this demonstrates that the fold is not useful. Yes, projects may use this pattern *if the builtin is not available*, but in our case the builtin is available, and should be used instead of the fallback implementation.

If this fallback code path is never actually used in practice, why are we implementing pattern matching for it?

https://github.com/llvm/llvm-project/pull/177110


More information about the llvm-commits mailing list