[PATCH] D99753: [SLP]Fix a bug in min/max reduction, number of condition uses.

Alexey Bataev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 2 06:28:59 PDT 2021


ABataev added a comment.

In D99753#2665179 <https://reviews.llvm.org/D99753#2665179>, @ABataev wrote:

> In D99753#2665171 <https://reviews.llvm.org/D99753#2665171>, @ABataev wrote:
>
>> In D99753#2665164 <https://reviews.llvm.org/D99753#2665164>, @spatel wrote:
>>
>>> In D99753#2665134 <https://reviews.llvm.org/D99753#2665134>, @ABataev wrote:
>>>
>>>> In D99753#2665081 <https://reviews.llvm.org/D99753#2665081>, @spatel wrote:
>>>>
>>>>> The problem/test looks similar to the one in 0a8e7ca402e <https://reviews.llvm.org/rG0a8e7ca402eb3470eb5faf4982581771cb849130> - can you explain how they differ (what allows these examples to avoid that fix)?
>>>>
>>>> The reduced root is not select instruction anymore, it is an intrinsic call. And we cannot extract the condition
>>>
>>> Can we remove the code that was added with D70148 <https://reviews.llvm.org/D70148> then? (assert that the final cmp has only 1 use or 0 remaining uses?)
>>> Hopefully, all of this becomes unnecessary after we switch to the min/max intrinsics.
>>
>> Yes, I think so. Will do this tomorrow.
>
> I have another idea - try to keep cmpinstruction as an external user. Will try to implement it tomorrow.

Tried it and currently, it is impossible to implement, as we need to know the reduction result for n-1 reduction values. This can be improved later by the non-power-2 SLP patch


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D99753



More information about the llvm-commits mailing list