[PATCH] D159190: [RISCV]Combine to make the fixed vector vadd of splats are scalarized

Liao Chunyu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 30 18:01:53 PDT 2023


liaolucy added a comment.

In D159190#4628397 <https://reviews.llvm.org/D159190#4628397>, @luke wrote:

> In D159190#4628357 <https://reviews.llvm.org/D159190#4628357>, @luke wrote:
>
>> In D159190#4628284 <https://reviews.llvm.org/D159190#4628284>, @liaolucy wrote:
>>
>>> In D159190#4628179 <https://reviews.llvm.org/D159190#4628179>, @luke wrote:
>>>
>>>> Thanks for the patch. Did you take a look at scalarizeBinOpOfSplats in DAGCombiner? I think that might be more generic, it's the combine that kicks in for the scalable vector test case in that issue. I was wondering if it would be possible to get it to work on fixed vectors too.
>>>
>>> I have a question, this ir has been optimized in the opt phase. https://godbolt.org/z/MPvvTG5dT  Maybe we don't need another combine in codegen?
>>
>> Good point, I didn't realise opt already took care of this. I guess it depends if this pattern is introduced during codegen at all
>
> I originally noticed this when looking at the code generated whilst expanding ISD::ROT{L,R}, e.g. https://godbolt.org/z/Wh99EPbja
> So it can be introduced after the middle-end (but it might not be that common)

Okay, making sure it's back-end introduced looks like it can be optimized. thanks


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D159190



More information about the llvm-commits mailing list