RFR: 8150038: aarch64: make use of CBZ and CBNZ when comparing narrow pointer with zero
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.
On 02/17/2016 02:33 PM, Felix Yang wrote:
Tested with jtreg hotspot & langtools. Is it OK?
Sure, that looks fine. Thanks, Andrew.
participants (2)
-
Andrew Haley
-
Felix Yang