<div dir="ltr">Hi Matt, <div><br></div><div>I found an issue with this patch that causes instcombine to run into an infinite loops. <div><br></div><div>The test case is attached. The loop begins with the addrspacecast instruction:</div>
<div><br></div><div>addrspacecast [16 x i32] addrspace(1)* %arr to i32</div><div><br></div><div>=> D2186</div><div><br></div><div>%0 = addrspacecast [16 x i32] addrspace(1)* %arr to [16 x i32]*</div><div>bitcast [16 x i32]* %0 to i32*</div>
<div><br></div><div>=> visitBitCast</div><div><br></div><div><div>%0 = addrspacecast [16 x i32] addrspace(1)* %arr to [16 x i32]*</div><div>getelementptr [16 x i32]* %0, i64 0, i64 0</div></div><div><br></div><div>=> visitGetElementPtr</div>
<div><br></div><div>%0 = getelementptr [16 x i32] addrspace(1)* %arr, i64 0, i64 0</div><div>addrspacecast i32 addrspace(1)* %0 to i32*</div><div><br></div><div>=> commonPointerCastTransforms</div><div><br></div><div>addrspacecast [16 x i32] addrspace(1)* %arr to i32</div>
<div><br></div><div>and we have a loop. </div><div><br></div><div>I'll try to figure out the root cause today. </div><div><br></div><div>Jingyue</div><div><br></div><div><br></div></div></div><div class="gmail_extra">
<br><br><div class="gmail_quote">On Thu, May 1, 2014 at 1:06 PM, Matt Arsenault <span dir="ltr"><<a href="mailto:Matthew.Arsenault@amd.com" target="_blank">Matthew.Arsenault@amd.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I think so. I haven't looked at any of my addrspacecast patches in a while, but I do want to get those in.<br>
<br>
<a href="http://reviews.llvm.org/D3586" target="_blank">http://reviews.llvm.org/D3586</a><br>
<br>
<br>
</blockquote></div><br></div>