RFR(M): 8073480: C2 should optimize explicit range checks (original) (raw)
Roland Westrelin roland.westrelin at oracle.com
Thu Mar 12 17:36:13 UTC 2015
- Previous message: RFR(M): 8073480: C2 should optimize explicit range checks
- Next message: Unsafe.{get,put}-X-Unaligned; Efficient array comparison intrinsics
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hi Aleksey,
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::uloop at 22 (line 65) 0x0000000110355f48: inc %r10d ;*iinc ; - arrays.ArrayTest::uloop at 24 (line 64) 0x0000000110355f4b: cmp %r11d,%r10d 0x0000000110355f4e: jl 0x0000000110355f40 ;*ificmpge ; - arrays.ArrayTest::uloop 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 uloop() 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.
Thanks for offering a test case but the issue you spotted is different from the one here where there’s an explicit range check is the code before a memory access. In that case we can use the explicit range check to remove integer to long conversion.
Roland.
- Previous message: RFR(M): 8073480: C2 should optimize explicit range checks
- Next message: Unsafe.{get,put}-X-Unaligned; Efficient array comparison intrinsics
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the hotspot-compiler-dev mailing list