<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div><br></div><blockquote type="cite"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Why do you need the isa<ConstantExpr>? Can't the check be just<br>
<br>
     if (!isSafeToSpeculativelyExecute(BB1V) ||<br>
!isSafeToSpeculativelyExecute(BB2V))<br>
       return Changed;</blockquote><div><br></div><div>The reason why is for performance and correctness. I don't want to look at every instruction that can be fed into an incoming value for a phi. I just want to see the ones that can be executed *before* the phi node in the same BB as the phi. Which are these? ConstantExprs. FWIW, another part of SimplifyCFG operates in the exact same way.<span></span></div>
<div><br></div>
</blockquote><br><div>Got it. Thanks.</div></body></html>