[PATCH] D128172: [SLP] Add cost model for `llvm.powi.*` intrinsics
Dave Green via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 22 09:47:47 PDT 2022
dmgreen added a comment.
Thanks, LGTM. Although I was wondering why the cost came out as 12, not 14 from the constant 42. It may be possible to get a slightly better costs that more accurately match the code from ExpandPowI.
================
Comment at: llvm/include/llvm/CodeGen/BasicTTIImpl.h:1424
+ // SelectionDAGBuilder.
+ unsigned ActiveBits = RHSC->getValue().getActiveBits();
+ InstructionCost Cost =
----------------
I think a more accurate count might be `ActiveBits + PopCount - 2`, at least from playing around with a few examples.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D128172/new/
https://reviews.llvm.org/D128172
More information about the llvm-commits
mailing list