[PATCH] D32605: Recognize CTLZ builtin

Evgeny Stupachenko via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 9 15:42:18 PDT 2017


evstupac added a comment.

In https://reviews.llvm.org/D32605#750247, @joerg wrote:

> Yeah, but even the generic expansion results in ~19 instructions on ARMv4. Compare that to one instruction in the loop and it can hardly be said to be a general win.


There should be at least 3 instructions in the loop: add, shift and branch. For 32 bit instruction it will run 16 iterations average, so 16 * 3 > 19.


Repository:
  rL LLVM

https://reviews.llvm.org/D32605





More information about the llvm-commits mailing list