RFR: 8150038: aarch64: make use of CBZ and CBNZ when comparing narrow pointer with zero
Felix Yang
felix.yang at linaro.org
Wed Feb 17 14:33:21 UTC 2016
Hi,
Please review the following webrev:
*http://cr.openjdk.java.net/~fyang/8150038/webrev.00/
<http://cr.openjdk.java.net/~fyang/8150038/webrev.00/>*
Jira issue: *https://bugs.openjdk.java.net/browse/JDK-8150038
<https://bugs.openjdk.java.net/browse/JDK-8150038>*
For several times I noticed the following pattern in C2 JIT code (the
java heap size is set to 200MB):
2042 0x0000007f6c9419c4: ldr w14, [x11,#32] ;*getfield buffer
2048 0x0000007f6c9419c8: cmp w14, wzr
2049 0x0000007f6c9419cc: b.eq 0x0000007f6c9425e4
;*invokevirtual reset
The two cmp and b.eq instructions can be combined into one "cbz" instruction.
Currently, the aarch64 port only makes use of CBZ and CBNZ when
comparing operands with Integer/Long/Pointer type with zero.
Patch fixes the issue by adding one similar combine pattern in the AD
file for Narrow pointer types(just like the sparc port does).
Tested with jtreg hotspot & langtools. Is it OK?
Thanks,
Felix.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/hotspot-compiler-dev/attachments/20160217/30b30a42/attachment.html>
More information about the hotspot-compiler-dev
mailing list