<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="text-align: left; direction: ltr; word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;">
<div>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.</div>
<div><br>
</div>
<div>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.</div>
<div><span>
<pre><br></pre>
<pre>-- <br></pre>
<div style="width: 71ch;">Stas</div>
</span></div>
<div><br>
</div>
<div>-----Original Message-----</div>
<div><b>From</b>: Benjamin Kramer <<a href="mailto:Benjamin%20Kramer%20%3cbenny.kra@gmail.com%3e">benny.kra@gmail.com</a>></div>
<div><b>To</b>: "Arsenault, Matthew" <<a href="mailto:%22Arsenault,%20Matthew%22%20%3cMatthew.Arsenault@amd.com%3e">Matthew.Arsenault@amd.com</a>></div>
<div><b>Cc</b>: "Mekhanoshin, Stanislav" <<a href="mailto:%22Mekhanoshin,%20Stanislav%22%20%3cStanislav.Mekhanoshin@amd.com%3e">Stanislav.Mekhanoshin@amd.com</a>>, llvm-commits <<a href="mailto:llvm-commits%20%3cllvm-commits@lists.llvm.org%3e">llvm-commits@lists.llvm.org</a>></div>
<div><b>Subject</b>: Re: [llvm] r367443 - [AMDGPU] Fix for vectorizer crash with pointers of different size</div>
<div><b>Date</b>: Thu, 01 Aug 2019 16:53:43 +0200</div>
<div><br>
</div>
<!-- text/html -->[CAUTION: External Email]
<div>
<div dir="ltr">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.</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Thu, Aug 1, 2019 at 3:14 PM Arsenault, Matthew <<a href="mailto:Matthew.Arsenault@amd.com">Matthew.Arsenault@amd.com</a>> wrote:<br>
</div>
<blockquote type="cite" style="margin:0 0 0 .8ex; border-left:2px #729fcf solid;padding-left:1ex">
<div>
<div style="direction:ltr">
<div>
<div></div>
</div>
<div><br>
</div>
<div class="gmail-m_2635103100846164712ms-outlook-ios-signature"></div>
</div>
<div>
<div dir="ltr">
<div class="gmail_quote">
<blockquote type="cite" style="margin:0 0 0 .8ex; border-left:2px #729fcf solid;padding-left:1ex">
<br>
<br>
</blockquote>
<div><br>
</div>
<div>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.</div>
<div><br>
</div>
<div>- Ben</div>
<div> </div>
<div style="direction:ltr">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.</div>
</div>
</div>
</div>
</div>
<br>
</blockquote>
</div>
</div>
</body>
</html>