[PATCH] D152001: [RISCV][SLP] Inflate insert/extract costs on very small vectors

Alexey Bataev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 20 11:19:30 PDT 2023


ABataev added a comment.

In D152001#4519686 <https://reviews.llvm.org/D152001#4519686>, @reames wrote:

> In D152001#4511274 <https://reviews.llvm.org/D152001#4511274>, @ABataev wrote:
>
>> In D152001#4511205 <https://reviews.llvm.org/D152001#4511205>, @reames wrote:
>>
>>> @ABataev ping?
>>
>> Check D154738 <https://reviews.llvm.org/D154738>
>
> I went and dug through this patch.  I really don't think your patch and mine are solving the same problem at all.  Yours appear to be focused on whether we should have vectorized an operation based on it's legality.  Mine is focused on biasing vectorization away from *legal* but *unprofitable* partial vectorization scenarios.  There's definitely an interaction here, but the approach is quite different.

They are solving the same problem. Just your patch prevents vectorization at all because of the high cost of insert/extract instructions, while mine just limits the graph by the nodes, which won't be scalarazied later. Thus, it just throws away sclarized vector instructions out of the graph and do not even try to vectorize them and estimate their vectorization cost (which is not vectorization, but scalarization instead)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D152001



More information about the llvm-commits mailing list