Skip to content
This repository was archived by the owner on Sep 2, 2022. It is now read-only.

Commit 5307afa

Browse files
Dong Bodean-long
Dong Bo
authored andcommitted
8260585: AArch64: Wrong code generated for shifting right and accumulating four unsigned short integers
Reviewed-by: iveresov, dlong, njian, aph
1 parent 1a7040e commit 5307afa

File tree

2 files changed

+463
-21
lines changed

2 files changed

+463
-21
lines changed

src/hotspot/cpu/aarch64/aarch64.ad

Lines changed: 5 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -18855,11 +18855,7 @@ instruct vsrla8B_imm(vecD dst, vecD src, immI shift) %{
1885518855
format %{ "usra $dst, $src, $shift\t# vector (8B)" %}
1885618856
ins_encode %{
1885718857
int sh = (int)$shift$$constant;
18858-
if (sh >= 8) {
18859-
__ eor(as_FloatRegister($src$$reg), __ T8B,
18860-
as_FloatRegister($src$$reg),
18861-
as_FloatRegister($src$$reg));
18862-
} else {
18858+
if (sh < 8) {
1886318859
__ usra(as_FloatRegister($dst$$reg), __ T8B,
1886418860
as_FloatRegister($src$$reg), sh);
1886518861
}
@@ -18874,11 +18870,7 @@ instruct vsrla16B_imm(vecX dst, vecX src, immI shift) %{
1887418870
format %{ "usra $dst, $src, $shift\t# vector (16B)" %}
1887518871
ins_encode %{
1887618872
int sh = (int)$shift$$constant;
18877-
if (sh >= 8) {
18878-
__ eor(as_FloatRegister($src$$reg), __ T16B,
18879-
as_FloatRegister($src$$reg),
18880-
as_FloatRegister($src$$reg));
18881-
} else {
18873+
if (sh < 8) {
1888218874
__ usra(as_FloatRegister($dst$$reg), __ T16B,
1888318875
as_FloatRegister($src$$reg), sh);
1888418876
}
@@ -18893,12 +18885,8 @@ instruct vsrla4S_imm(vecD dst, vecD src, immI shift) %{
1889318885
format %{ "usra $dst, $src, $shift\t# vector (4H)" %}
1889418886
ins_encode %{
1889518887
int sh = (int)$shift$$constant;
18896-
if (sh >= 16) {
18897-
__ eor(as_FloatRegister($src$$reg), __ T8B,
18898-
as_FloatRegister($src$$reg),
18899-
as_FloatRegister($src$$reg));
18900-
} else {
18901-
__ ushr(as_FloatRegister($dst$$reg), __ T4H,
18888+
if (sh < 16) {
18889+
__ usra(as_FloatRegister($dst$$reg), __ T4H,
1890218890
as_FloatRegister($src$$reg), sh);
1890318891
}
1890418892
%}
@@ -18912,11 +18900,7 @@ instruct vsrla8S_imm(vecX dst, vecX src, immI shift) %{
1891218900
format %{ "usra $dst, $src, $shift\t# vector (8H)" %}
1891318901
ins_encode %{
1891418902
int sh = (int)$shift$$constant;
18915-
if (sh >= 16) {
18916-
__ eor(as_FloatRegister($src$$reg), __ T16B,
18917-
as_FloatRegister($src$$reg),
18918-
as_FloatRegister($src$$reg));
18919-
} else {
18903+
if (sh < 16) {
1892018904
__ usra(as_FloatRegister($dst$$reg), __ T8H,
1892118905
as_FloatRegister($src$$reg), sh);
1892218906
}

0 commit comments

Comments
 (0)