<div dir="ltr"><span style="font-size:12.8px">Hi,</span><div><br></div><div>    <span style="font-size:12.8px">Please review webrev: <a href="http://cr.openjdk.java.net/~fyang/8152537/webrev.00">http://cr.openjdk.java.net/~fyang/8152537/webrev.00</a></span></div><div><span style="font-size:12.8px">    JIRA issue: <a href="https://bugs.openjdk.java.net/browse/JDK-8152537">https://bugs.openjdk.java.net/browse/JDK-8152537</a></span></div><div><br style="font-size:12.8px"><span style="font-size:12.8px">    For many times I noticed the following C2 JIT code in specJBB2005 and other benchmarks:</span><br style="font-size:12.8px"><br style="font-size:12.8px"><span style="font-size:12.8px">    0x0000007f7cd8b4f8: ldr w11, [x17,#12] ;*arraylength</span><br style="font-size:12.8px"><span style="font-size:12.8px">                                                              ; - java.lang.String::hashCode@13 (line 1467)</span><br style="font-size:12.8px"><span style="font-size:12.8px">                                                              ; implicit exception: dispatches to 0x0000007f7cd8b604</span><br style="font-size:12.8px"><span style="font-size:12.8px">    0x0000007f7cd8b4fc: cmp w11, #0x0</span><br style="font-size:12.8px"><span style="font-size:12.8px">    0x0000007f7cd8b500: b.le 0x0000007f7cd8b5e8 ;*ifle</span><br style="font-size:12.8px"><span style="font-size:12.8px">                                                              ; - java.lang.String::hashCode@14 (line 1467)</span><br style="font-size:12.8px"><br style="font-size:12.8px"><span style="font-size:12.8px">    0x0000007f7cd8b504: cmp w11, #0x0</span><br style="font-size:12.8px"><span style="font-size:12.8px">    0x0000007f7cd8b508: </span><a href="http://b.ls/" rel="noreferrer" target="_blank" style="font-size:12.8px">b.ls</a><span style="font-size:12.8px"> 0x0000007f7cd8b5f0</span><br style="font-size:12.8px"><span style="font-size:12.8px">    0x0000007f7cd8b50c: sub w12, w11, #0x1</span><br style="font-size:12.8px"><span style="font-size:12.8px">    0x0000007f7cd8b510: cmp w12, w11</span><br style="font-size:12.8px"><span style="font-size:12.8px">    0x0000007f7cd8b514: b.cs 0x0000007f7cd8b5f0 ;*bipush</span><br style="font-size:12.8px"><span style="font-size:12.8px">                                                              ; - java.lang.String::hashCode@33 (line 1471)</span><br style="font-size:12.8px"><br style="font-size:12.8px"><span style="font-size:12.8px">    0x0000007f7cd8b518: ldrh w0, [x17,#16] ;*caload</span><br style="font-size:12.8px"><span style="font-size:12.8px">                                                              ; - java.lang.String::hashCode@39 (line 1471)</span><br style="font-size:12.8px"><br style="font-size:12.8px"><span style="font-size:12.8px">    0x0000007f7cd8b51c: sub w13, w11, #0x3</span><br style="font-size:12.8px"><span style="font-size:12.8px">    0x0000007f7cd8b520: cmp w12, w13</span><br style="font-size:12.8px"><span style="font-size:12.8px">    0x0000007f7cd8b524: orr w16, wzr, #0x80000000</span><br style="font-size:12.8px"><span style="font-size:12.8px">    0x0000007f7cd8b528: lsl w10, w0, #5</span><br style="font-size:12.8px"><span style="font-size:12.8px">    0x0000007f7cd8b52c: csel w16, w16, w13, lt</span><br style="font-size:12.8px"><span style="font-size:12.8px">    0x0000007f7cd8b530: orr w1, wzr, #0x1</span><br style="font-size:12.8px"><span style="font-size:12.8px">    0x0000007f7cd8b534: sub w14, w10, w0</span><br style="font-size:12.8px"><span style="font-size:12.8px">    0x0000007f7cd8b538: cmp w16, #0x1</span><br style="font-size:12.8px"><span style="font-size:12.8px">    0x0000007f7cd8b53c: b.le 0x0000007f7cd8b5a4</span><br style="font-size:12.8px"><span style="font-size:12.8px">    0x0000007f7cd8b540: b 0x0000007f7cd8b554</span><br style="font-size:12.8px"><br style="font-size:12.8px"><span style="font-size:12.8px">    Patch combines the following two instructions into one cbzw instruction:</span><br style="font-size:12.8px"><span style="font-size:12.8px">    0x0000007f7cd8b504: cmp w11, #0x0</span><br style="font-size:12.8px"><span style="font-size:12.8px">    0x0000007f7cd8b508: </span><a href="http://b.ls/" rel="noreferrer" target="_blank" style="font-size:12.8px">b.ls</a><span style="font-size:12.8px"> 0x0000007f7cd8b5f0</span><br></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">    Tested with JTreg hotspot, langtools and jdk.  Is it OK?</span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">Thanks,</span></div><div><span style="font-size:12.8px">Felix</span></div></div>