[PATCH] D142456: [AArch64][CostModel]: Add costs for zero/sign extend.

hassnaaHamdi via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 25 06:37:39 PST 2023


hassnaa-arm added a comment.

In D142456#4079512 <https://reviews.llvm.org/D142456#4079512>, @sdesmalen wrote:

> In D142456#4079499 <https://reviews.llvm.org/D142456#4079499>, @hassnaa-arm wrote:
>
>> In D142456#4079434 <https://reviews.llvm.org/D142456#4079434>, @dmgreen wrote:
>>
>>>> where each operation has a cost of 2
>>>
>>> Why does each instruction have a cost of 2?
>>
>> Because that is mentioned here: https://developer.arm.com/documentation/pjdoc466751330-9685/latest/ 
>> in section 3.25 (SVE integer instructions)
>
> Hi @hassnaa-arm, the cost-model shouldn't be hardcoding the number of cycles for one specific micro-architecture, because the cost-model should be accurate for other micro-architectures as well.
> The cost requested here is the througput cost, not the latency. The throughput is closer to the number of instructions that is required for the operation.

The throughput of the unpack operation is 2.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D142456/new/

https://reviews.llvm.org/D142456



More information about the llvm-commits mailing list