<div dir="auto"><div>I haven't looked at the patch yet, (and I'm also not at the office), but:<div dir="auto"><br></div><div dir="auto">1) The new probabilities should be the opposite of the last example Dehao had. That is, the external if should be 1/7, and the one on the backedge 7/28.</div><div dir="auto"><br></div><div dir="auto">2) I think this is just conditional probability - cond hasn't changed, but P(cond | cond has been true once) is lower than P(cond). This exactly corresponds to lowering the number of expected iterations by 1, given that we know we already executed one iteration.</div><br><div class="gmail_extra"><br><div class="gmail_quote">On Jan 12, 2017 09:21, "Xin Tong via Phabricator" <<a href="mailto:reviews@reviews.llvm.org">reviews@reviews.llvm.org</a>> wrote:<br type="attribution"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">trentxintong added a comment.<br>
<br>
@danielcdh Its the true the cond is not changed, but the inputs to the condition has changed, before you were testing with index variable in the loop header, now u have 2 conditions and the SSA values you use in the conditions have changed, so the probability needs to be adjusted. I will explain more when i get to office.<br>
<br>
<br>
<a href="https://reviews.llvm.org/D28593" rel="noreferrer" target="_blank">https://reviews.llvm.org/<wbr>D28593</a><br>
<br>
<br>
<br>
</blockquote></div><br></div></div></div>