<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Jan 10, 2017, at 19:13, Kyle Butt <<a href="mailto:iteratee@google.com" class="">iteratee@google.com</a>> wrote:</div><div class=""><div dir="ltr" class=""><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="HOEnZb"><font color="#888888" class=""><br class=""></font></span></blockquote><div class=""><br class=""></div><div class="">I looked at the code in question. There are more compare instructions, but no codepath should execute more of them. Which codepath are you concerned about?</div><div class=""><br class=""></div><div class="">For the compare, and 1 of the branches, it occurs due to tail duplication, and so for those, this is not a regression, it is WAI.</div><div class=""><br class=""></div><div class="">Are you worried about the code size, or did this actually cause a performance regression?</div><div class="">If it did cause a regression, can you tell me which path is the hot path? </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="HOEnZb"><font color="#888888" class="">
-Matt<br class="">
<br class="">
</font></span></blockquote></div><br class=""></div><div class="gmail_extra">Thanks,</div><div class="gmail_extra">Kyle.</div></div>
</div></blockquote></div><br class=""><div class="">This changes from having a path where no branch occurs, to ensuring that a branch will occur, and branches are expensive. I noticed this from the code size changes, but I’m mostly surprised by replacing a fall through with a branch.</div><div class=""><br class=""></div><div class="">Looking at the expected cycle counts on all paths in the artificial testcase, the loads + waits are always skipped, which is good. I think if the waitcnts were inserted smarter, the original code CFG would be slightly better. I need to look more at the full testcase.</div><div class=""><br class=""></div><div class="">-Matt</div></body></html>