forked from openjdk/jdk
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This patch is a supplement for https://bugs.openjdk.java.net/browse/JDK-8248830. With the implementation of rotate node in IR, this patch: 1. canonicalizes RotateLeft into RotateRight when shift is a constant, so that GVN could identify the pre-existing node better. 2. implements scalar rotate match rules and removes the original combinations of Or and Shifts on AArch64. This patch doesn't implement vector rotate due to the lack of corresponding vector instructions on AArch64. Test case below is an explanation for this patch. public static int test(int i) { int a = (i >>> 29) | (i << -29); int b = i << 3; int c = i >>> -3; int d = b | c; return a ^ d; } Before: lsl w12, w1, openjdk#3 lsr w10, w1, openjdk#29 add w11, w10, w12 orr w12, w12, w10 eor w0, w11, w12 After: ror w10, w1, openjdk#29 eor w0, w10, w10 Tested jtreg TestRotate.java, hotspot::hotspot_all_no_apps, jdk::jdk_core, langtools::tier1. Change-Id: Id7d00935945f1697247fff7041b0707107862786
- Loading branch information
Eric Liu
committed
Nov 13, 2020
1 parent
3ce09c0
commit be71bf6
Showing
4 changed files
with
80 additions
and
170 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters