<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jul 14, 2016 at 7:09 AM, Ehsan A Amiri <span dir="ltr"><<a href="mailto:amehsan@ca.ibm.com" target="_blank">amehsan@ca.ibm.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><p>This is order of events:<br><br></p></div></blockquote><div>This order cannot be correct if the solution I gave (or adding simplification to *some place in GVN*) does not work.  Or GVN is broken in other ways.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><p>1) GVN starts looking at the function. At this point the phi node has two different incoming values.<br>2) GVN performs an RAUW. The phi is converted to the one that has two identincal incoming values. </p></div></blockquote><div><br></div><div>At this point, it should now process the phi instruction again before it processes the load, because it is doing a reverse postorder traversal.</div><div>When it did that, the phi should have been simplified</div><div>So why did that not happen?</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><p><br></p></div></blockquote><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><p>Given the complexity of fixing the real problem,</p></div></blockquote><div><br></div><div>Look, i understand why you want to just fix this in AA and be done with it.</div><div>Really, I do. </div><div><br></div><div>I understand you have spent a lot of time on this bug, and I greatly appreciate that.</div><div>But I really want to understand what is going on before we try to actually fix it.</div><div>I have a good understanding of what happens once the bad answer gets into memdep (and thank you for that!), but i still have trouble seeing why it lived long enough to get there.</div><div><br></div><div>To that end, so you don't have to spend more time running around for me,  i'll take over this bug, and either figure out why GVN lets this PHI live to the point it gets an AA query about it (and fix it/decide it can't be fixed), or commit the AA patch for you if we decide it can't be fixed.</div><div><br></div><div>My ETA is by friday.</div><div><br></div><div>I assume the testcase in the bug is the one we are still using, right?<br>(If not, if you can attach it, that would be helpful)</div><div><br></div><div><br></div></div></div></div>