RFR(M): 8073480: C2 should optimize explicit range checks

Aleksey Shipilev aleksey.shipilev at oracle.com
Mon Mar 2 17:56:07 UTC 2015


Hi Roland,

On 02/25/2015 07:28 PM, Roland Westrelin wrote:
>> And here is the same on jdk9/hs-rt with your patch applied:
>>
>> 0x0000000110355f40: movslq %r10d,%r9
>> 0x0000000110355f43: add    0x10(%r8,%r9,4),%eax  ;*iadd
>>                                              ; - arrays.ArrayTest::u_loop at 22 (line 65)
>>
>> 0x0000000110355f48: inc    %r10d              ;*iinc
>>                                              ; - arrays.ArrayTest::u_loop at 24 (line 64)
>>
>> 0x0000000110355f4b: cmp    %r11d,%r10d
>> 0x0000000110355f4e: jl     0x0000000110355f40  ;*if_icmpge
>>                                              ; - arrays.ArrayTest::u_loop at 12 (line 64)
>>
>> I wish we could get rid of those pesky "movslq" instructions :-) but IIUC that is tricky.
> 
> Are the movslq there only for the u_loop() case? Can you send me your test case. I’ll see if I can make them go away.

Do you still want a testcase? I have a JMH nanobenchmark that reproduces
exactly this behavior.

-Aleksey.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://mail.openjdk.java.net/pipermail/hotspot-compiler-dev/attachments/20150302/17896035/signature.asc>


More information about the hotspot-compiler-dev mailing list