[llvm] r367443 - [AMDGPU] Fix for vectorizer crash with pointers of different size

Artem Belevich via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 1 11:33:35 PDT 2019


Can you revert the change while you're looking for a better solution? This
patch has a noticeable negative impact on performance of GPU code we use.

Thank you,
--Artem

On Thu, Aug 1, 2019 at 11:14 AM Mekhanoshin, Stanislav via llvm-commits <
llvm-commits at lists.llvm.org> wrote:

> In your case search ends before pointers change address space. They all
> come to the same root casted pointer "%alloc16 = addrspacecast i8* %alloc1
> to i8 addrspace(1)*". In the failing case which was fixed one of the
> pointers has addrspacecast stripped while the search was still in progress,
> which has caused the problem.
>
> I am looking if I can find a better cutoff criteria. Size is one of such
> possible criteria, but I want to look into this a little more.
>
>
> --
>
> Stas
>
> -----Original Message-----
> *From*: Benjamin Kramer <benny.kra at gmail.com
> <Benjamin%20Kramer%20%3cbenny.kra at gmail.com%3e>>
> *To*: "Arsenault, Matthew" <Matthew.Arsenault at amd.com
> <%22Arsenault,%20Matthew%22%20%3cMatthew.Arsenault at amd.com%3e>>
> *Cc*: "Mekhanoshin, Stanislav" <Stanislav.Mekhanoshin at amd.com
> <%22Mekhanoshin,%20Stanislav%22%20%3cStanislav.Mekhanoshin at amd.com%3e>>,
> llvm-commits <llvm-commits at lists.llvm.org
> <llvm-commits%20%3cllvm-commits at lists.llvm.org%3e>>
> *Subject*: Re: [llvm] r367443 - [AMDGPU] Fix for vectorizer crash with
> pointers of different size
> *Date*: Thu, 01 Aug 2019 16:53:43 +0200
>
> [CAUTION: External Email]
> Currently not at my workstation, attached is a test case that I scraped
> from the logs. This should have a <4 x float> load & store and scalar
> arithmetic after going through LoadStoreVectorizer.
>
> On Thu, Aug 1, 2019 at 3:14 PM Arsenault, Matthew <
> Matthew.Arsenault at amd.com> wrote:
>
>
>
>
>
> This is too aggressive, it will prevent any pointer pair that's
> addrspacecast'ed from ever being recognized as consecutive. What's the
> reason for not checking the size? I'm seeing regressions where pointers are
> getting loaded from memory and then casted to the right addresspace.
>
> - Ben
>
> Do you have an example where this matters? I would expect any cases that
> are vectorizable and involve an addrspacecast would be taken care of by
> InferAddressSpaces, so the vectorizer doesn’t need to worry about them.
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>


-- 
--Artem Belevich
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190801/3e142a14/attachment.html>


More information about the llvm-commits mailing list