[PATCH] D32605: Recognize CTLZ builtin

Evgeny Stupachenko via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 12 13:52:41 PDT 2017


evstupac added inline comments.


================
Comment at: test/Transforms/LoopIdiom/ARM/ctlz.ll:150
+; Here it will replace the loop -
+; assume builtin is always profitable.
+;
----------------
rengolin wrote:
> I'll let Joerg comment on this. It'll depend on the generated code vs. the loop's size, branches, etc.
It looks like Joerg already answered on this:
>>! In D32605#750321, @joerg wrote:
> Replacing the full loop with the intrinsic is ok. 

I thought it would be complicated to check, but looks like insns count is a good way to do this.


Repository:
  rL LLVM

https://reviews.llvm.org/D32605





More information about the llvm-commits mailing list