<div dir="ltr">Hi Chad,<div><br></div><div class="gmail_extra"><br><br><div class="gmail_quote">2014-07-10 4:08 GMT+08:00 Chad Rosier <span dir="ltr"><<a href="mailto:mcrosier@codeaurora.org" target="_blank">mcrosier@codeaurora.org</a>></span>:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Hi t.p.northover, jmolloy,<br>
<br>
This patch generates tbz/tbnz when comparing against zero. The tbz/tbnz checks the sign bit to convert<br>
<br>
add/sub w1, w1, w10<br>
cmp w1, #0<br>
<a href="http://b.lt" target="_blank">b.lt</a> .LBB0_0<br>
<br>
to<br>
<br>
adds/subs w1, w1, w10<br>
tbnz w1, #31, .LBB0_0<br></blockquote><div><br></div><div>I think there are two cases around this,</div><div><br></div><div>1) LHS can support flags update like ADDS/SUBS, and we can cover more like ANDS, ORRS and others etc.</div>
<div>2) LHS can't support flags update and BR_CC is the only user. At present performBRCONDCombine can cover this scenario. </div><div><br></div><div>The patch would be more complete if you can add more instructions for case 1.</div>
<div><br></div><div>For case 2, it can be a separate patch, I think.</div><div><br></div><div>Thanks,</div><div>-Jiangning</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<br>
Please have a look.<br>
<br>
On an A53 processor this improves the following benchmarks:<br>
office_suite/OAv2mark +3%<br>
office_suite/rotatev2data* +6-10%<br>
<br>
I also saw improvements in spec2000 parser, vortex, and vpr, but just barely above noise, so I wouldn't bank on them. These numbers were based on the community mainline.<br>
<br>
Chad<br>
<br>
<a href="http://reviews.llvm.org/D4440" target="_blank">http://reviews.llvm.org/D4440</a><br>
<br>
Files:<br>
lib/Target/AArch64/AArch64ISelLowering.cpp<br>
test/CodeGen/AArch64/tbz-tbnz.ll<br>
</blockquote></div><br></div></div>