RFR: 8256438: AArch64: Implement match rules with ROR shift register value
Eric Liu
github.com+10482586+therealeliu at openjdk.java.net
Mon Dec 21 10:15:02 UTC 2020
This patch transforms '(x >>> rshift) + (x << lshift)' into
'RotateRight(x, rshift)' during GVN phase when both the shift exponents
are constants and their sum equals to the number of bits for the type
of shift base.
This patch implements some new match rules for AArch64 instructions
which can take ROR as the optional shift. Such instructions are 'and',
'or', 'eor', 'eon', 'bic' and 'orn'.
ror w11, w2, #5
eor w0, w1, w11
With this patch, above code could be optimized to below:
eor w0, w1, w2, ror #5
Finally, the patch refactors TestRotate.java[1][2].
Tested jtreg TestRotate.java, hotspot::hotspot_all_no_apps,
jdk::jdk_core, langtools::tier1.
[1] https://bugs.openjdk.java.net/browse/JDK-8252776
[2] https://mail.openjdk.java.net/pipermail/hotspot-compiler-dev/2020-September/039911.html
-------------
Commit messages:
- 8256438: AArch64: Implement match rules with ROR shift register value
Changes: https://git.openjdk.java.net/jdk/pull/1858/files
Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=1858&range=00
Issue: https://bugs.openjdk.java.net/browse/JDK-8256438
Stats: 954 lines in 4 files changed: 630 ins; 24 del; 300 mod
Patch: https://git.openjdk.java.net/jdk/pull/1858.diff
Fetch: git fetch https://git.openjdk.java.net/jdk pull/1858/head:pull/1858
PR: https://git.openjdk.java.net/jdk/pull/1858
More information about the hotspot-compiler-dev
mailing list