<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jan 10, 2017 at 6:29 PM, Matt Arsenault <span dir="ltr"><<a href="mailto:arsenm2@gmail.com" target="_blank" class="cremed">arsenm2@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class=""><br>
> On Jan 10, 2017, at 15:04, Kyle Butt via llvm-commits <<a href="mailto:llvm-commits@lists.llvm.org" class="cremed">llvm-commits@lists.llvm.org</a>> wrote:<br>
><br>
> Author: iteratee<br>
> Date: Tue Jan 10 17:04:30 2017<br>
> New Revision: 291609<br>
><br>
> URL: <a href="http://llvm.org/viewvc/llvm-project?rev=291609&view=rev" rel="noreferrer" target="_blank" class="cremed">http://llvm.org/viewvc/llvm-<wbr>project?rev=291609&view=rev</a><br>
> Log:<br>
> CodeGen: Allow small copyable blocks to "break" the CFG.<br>
><br>
> When choosing the best successor for a block, ordinarily we would have preferred<br>
> a block that preserves the CFG unless there is a strong probability the other<br>
> direction. For small blocks that can be duplicated we now skip that requirement<br>
> as well.<br>
><br>
> Differential revision: <a href="https://reviews.llvm.org/D27742" rel="noreferrer" target="_blank" class="cremed">https://reviews.llvm.org/<wbr>D27742</a><br>
<br>
</span>Hi,<br>
<br>
This has caused a code quality regression for me. Attached is a reduced testcase. This patch caused a net gain of 2 branches and a compare instruction. Any idea on how to fix it?<br>
<span class="HOEnZb"><font color="#888888"><br></font></span></blockquote><div><br></div><div>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><br></div><div>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><br></div><div>Are you worried about the code size, or did this actually cause a performance regression?</div><div>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">
-Matt<br>
<br>
</font></span></blockquote></div><br></div><div class="gmail_extra">Thanks,</div><div class="gmail_extra">Kyle.</div></div>