[PATCH] D101297: [SLP]Allow masked gathers only if allowed by target.
Roman Lebedev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 27 06:35:58 PDT 2021
lebedev.ri added a comment.
In D101297#2719522 <https://reviews.llvm.org/D101297#2719522>, @ABataev wrote:
> In D101297#2719505 <https://reviews.llvm.org/D101297#2719505>, @spatel wrote:
>
>> In D101297#2719479 <https://reviews.llvm.org/D101297#2719479>, @ABataev wrote:
>>
>>> In D101297#2719468 <https://reviews.llvm.org/D101297#2719468>, @spatel wrote:
>>>
>>>> We seem to go back and forth on legality vs. pure cost model to decide what is allowed for vectorization.
>>>> This would undo part of D90445 <https://reviews.llvm.org/D90445>, so adding potential reviewers for more feedback.
>>>
>>> Pure cost won't work here, we need to check if this is legal just to try to generate masked gather at all. Cost problem is different.
>>
>> Is there some gather construct that is impossible for the backend to expand correctly or just that it can't be expanded efficiently?
>
> There is known problem that after landing of the patch with masked gathers some of the code produces wrong results, so I suppose yes, there is a problem with lowering.
Is there a bugreport with reproducer?
> Generally speaking, would be good to calculate the cost/lower masked gathers to simple gathers if it is not legal/not profitable to use masked gathers. And tweak the cost model for such a case. AS temp solution we can add simple legality checks, at least, without early checks for the cost.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D101297/new/
https://reviews.llvm.org/D101297
More information about the llvm-commits
mailing list