<div dir="ltr">What I can't figure out is why we don't get the same basic block layout for b.ll.... <div><br></div><div>Specifically, I understand that we essentially have an iteration peeled out of the loop by loop rotation. But the result still should get the fancy layout that causes the hot conditional branch (away from the unreachable) to fall through into the loop header... </div></div><br><div class="gmail_quote"><div dir="ltr">On Mon, Dec 18, 2017 at 4:21 PM Wei Mi <<a href="mailto:wmi@google.com">wmi@google.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Mon, Dec 18, 2017 at 4:14 PM, Wei Mi <span dir="ltr"><<a href="mailto:wmi@google.com" target="_blank">wmi@google.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi,<br><br>Recently 10% performance regression on an important benchmark showed up after we integrated <a href="https://reviews.llvm.org/rL318299" target="_blank">https://reviews.llvm.org/rL318299</a>. The analysis showed that rL318299 triggered loop rotation on an multi exits loop, and the loop rotation introduced code layout issue. The performance regression is a side-effect of rL318299. I got two testcases a.ll and b.ll attached to illustrate the problem. a.ll was generated by rL318298 and b.ll was generated by rL318299.</div></blockquote><div><br></div></div></div></div><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div>a.ll and b.ll are generated from the same function by different versions of compiler. a.s and b.s generated from a.ll and b.ll respectively showed where the performance difference comes from. </div></div></div></div>
</blockquote></div>