[PATCH] D32605: Recognize CTLZ builtin

Evgeny Stupachenko via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 27 12:16:55 PDT 2017


evstupac added a comment.

Hi Renato,

I assume if CPU have ctlz the transformation is always profitable. For x86 CPUs it is so.
In LLVM source code we replace such loops with the builtin in APInt module for better compile time.
For other architectures it is questionable (and I'm not able to test this), however I agree to guard this.

Thanks,
Evgeny


Repository:
  rL LLVM

https://reviews.llvm.org/D32605





More information about the llvm-commits mailing list