[PATCH] D82227: SLP: honor requested max vector size merging PHIs

Stanislav Mekhanoshin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Jun 21 10:36:00 PDT 2020


rampitec added a comment.

In D82227#2105650 <https://reviews.llvm.org/D82227#2105650>, @ABataev wrote:

> In D82227#2105554 <https://reviews.llvm.org/D82227#2105554>, @rampitec wrote:
>
> > In D82227#2105469 <https://reviews.llvm.org/D82227#2105469>, @ABataev wrote:
> >
> > > Why it is required?
> >
> >
> > The whole pass only creates vectors up to the size of a vector register provided by a target, this is simply an omission in this place not to check it.
> >
> > On practice the testcase is reduced from a real app where it has created two <32 x float> vectors and RA run out of registers. Both have to be alive at the same loop and we did not have sufficient number of registers.
>
>
> Actually, that was the goal in some cases, to create the vectors of the maximum possible length so, later they could be split into several smaller vectors. I addume, this chanhe may increase compile time on the regular targets, where we can create large vectors without problems.
>  I think, you need to fix the cost of the vectorization of the large vectors for your target, so the SLP could consider it unprofitable to vectorize large vectors.


Isn't it inconsistent to use one width for arithmetic and another for phis? In particular I am getting more instructions after SLP for the actual app behind this test than without it because it forms <32 x float> phis and then lots of extractelement and insertelement to get to actual elements and perform arithmetic on it.


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

https://reviews.llvm.org/D82227





More information about the llvm-commits mailing list