<html><body><p>So I will first experiment with (3). If we don't like the outcome, then we can experiment with (2) to see how feasible is that.<br><br><b>Daniel</b>: Thanks for the response to my question.  But now I need to ask two more question to understand things:<br><br><i><font size="4">As mentioned, in your testcase, there is another bug here.  Remember  that GVN iterates until things stop changing. So *the first gvn pass* should have never left the IR with that redundant PHI node in the first place.</font></i><br><br><font size="4">1- IIUC, we are saying that at the end of one GVN iteration, the IR should satisfy some properties. Is it possible to describe this properties? </font><br><font size="4">2- I suspect that the "other bug" that you are talking about is a GVN bug. Could you elaborate on that if this is correct? IIRC from my debugging, the redundant phi node was created and deleted in iteration 0 of GVN. It was just that cache issue that happened between the creation and deletion of redundant phi node that caused this....</font><br><br><font size="4">Thanks</font><br><font size="4">Ehsan</font><br><br><br><br><img width="16" height="16" src="cid:1__=8FBBF562DFFC7FAB8f9e8a93df938690918c8FB@" border="0" alt="Inactive hide details for Daniel Berlin ---07/15/2016 04:08:45 PM---> >"><font color="#424282">Daniel Berlin ---07/15/2016 04:08:45 PM---> ></font><br><br><font size="2" color="#5F5F5F">From:        </font><font size="2">Daniel Berlin <dberlin@dberlin.org></font><br><font size="2" color="#5F5F5F">To:        </font><font size="2">Hal Finkel <hfinkel@anl.gov></font><br><font size="2" color="#5F5F5F">Cc:        </font><font size="2">llvm-commits <llvm-commits@lists.llvm.org>, reviews+D22305+public+92ca108e50bc4651@reviews.llvm.org, Ehsan A Amiri/Toronto/IBM@IBMCA</font><br><font size="2" color="#5F5F5F">Date:        </font><font size="2">07/15/2016 04:08 PM</font><br><font size="2" color="#5F5F5F">Subject:        </font><font size="2">Re: [PATCH] D22305: [BasicAA] Strip phi nodes, when all incoming values are the same.</font><br><hr width="100%" size="2" align="left" noshade style="color:#8091A5; "><br><br>
<ul><br><br><font size="4" face="Arial">Or do we need (2) because in general this kind of phi node is seen in many programs? Or something else that I do not see....</font><p><br><font size="4" face="Arial">That is hal's view.</font></ul>
<ul><font face="Arial">My view was that we should measure the impact of the change and then decide; but that if we have a use case for it, I'd rather it be inside the generic utility than a specific work-around in BasicAA.</font></ul><br><font size="4">Yes, sorry, was writing quickly, did not mean to imply anything else ;)</font><br><br><BR>
</body></html>