[PATCH] D109509: [SelectionDAG] PromoteIntRes_EXTRACT_SUBVECTOR for scalable vectors (widening).

Sander de Smalen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 10 04:12:44 PDT 2021


sdesmalen added a comment.

In D109509#2994170 <https://reviews.llvm.org/D109509#2994170>, @frasercrmck wrote:

> In D109509#2994157 <https://reviews.llvm.org/D109509#2994157>, @sdesmalen wrote:
>
>> Ah, sorry I misunderstood that!
>>
>> What result type would require promotion? I'd need an example where the result would need to be promoted and the input widened.
>
> My bad, I should have been clearer. I hope I wasn't too hasty in my suggestion; I was initially thinking of something like `<vscale x 3 x i4>` from `<vscale x 9 x i4>` but they both need promoting //and// widening, and now I've forgotten in which order those take place.

It seems that trying with an example of i4's (e.g. extracting nxv2i4 from nxv12i4), it actually runs into various other failures that would need fixing first, e.g. widening the truncate to i4's of the input vector. The exact example you gave above (where both need widening), actually fails even earlier in `SelectionDAGBuilder::getCopyToPartsVector`.

I'm not sure I can come up with an example where it does go down this code path though. Do you want me to keep the tests even if they don't exactly test the code in this patch?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D109509



More information about the llvm-commits mailing list