From 87ca29e88b682424cfe6aa842206ceebb125c0d8 Mon Sep 17 00:00:00 2001 From: "Jin,Zhonghui" Date: Wed, 29 Nov 2023 20:00:51 +0800 Subject: [PATCH] [Backport] 8269952: compiler/vectorapi/VectorCastShape*Test.java tests failed on avx2 machines Summary: 8269952: compiler/vectorapi/VectorCastShape*Test.java tests failed on avx2 machines Test Plan: ci jtreg Reviewed-by: JoshuaZhuwj Issue: https://github.com/dragonwell-project/dragonwell11/issues/577 --- src/hotspot/cpu/x86/x86.ad | 10 +++++----- test/hotspot/jtreg/ProblemList.txt | 3 --- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/src/hotspot/cpu/x86/x86.ad b/src/hotspot/cpu/x86/x86.ad index d6ef1666954..14ee0f00ee3 100644 --- a/src/hotspot/cpu/x86/x86.ad +++ b/src/hotspot/cpu/x86/x86.ad @@ -6664,7 +6664,7 @@ instruct vcastBtoX(vec dst, vec src) %{ %} instruct castStoX(vec dst, vec src, rRegP scratch) %{ - predicate(UseAVX <= 2 && + predicate((UseAVX <= 2 || !VM_Version::supports_avx512vlbw()) && vector_length(n->in(1)) <= 8 && // src vector_element_basic_type(n) == T_BYTE); effect(TEMP scratch); @@ -6680,7 +6680,7 @@ instruct castStoX(vec dst, vec src, rRegP scratch) %{ %} instruct vcastStoX(vec dst, vec src, vec vtmp, rRegP scratch) %{ - predicate(UseAVX <= 2 && + predicate((UseAVX <= 2 || !VM_Version::supports_avx512vlbw()) && vector_length(n->in(1)) == 16 && // src vector_element_basic_type(n) == T_BYTE); effect(TEMP dst, TEMP vtmp, TEMP scratch); @@ -6698,7 +6698,7 @@ instruct vcastStoX(vec dst, vec src, vec vtmp, rRegP scratch) %{ %} instruct vcastStoX_evex(vec dst, vec src) %{ - predicate(UseAVX > 2 || + predicate((UseAVX > 2 && VM_Version::supports_avx512vlbw()) || (vector_length_in_bytes(n) >= vector_length_in_bytes(n->in(1)))); // dst >= src match(Set dst (VectorCastS2X src)); format %{ "vector_cast_s2x $dst,$src\t!" %} @@ -6813,13 +6813,13 @@ instruct vcastItoX_evex(vec dst, vec src) %{ __ evpmovdw($dst$$XMMRegister, $src$$XMMRegister, src_vlen_enc); break; case T_FLOAT: - __ vcvtdq2ps($dst$$XMMRegister, $dst$$XMMRegister, dst_vlen_enc); + __ vcvtdq2ps($dst$$XMMRegister, $src$$XMMRegister, dst_vlen_enc); break; case T_LONG: __ vpmovsxdq($dst$$XMMRegister, $src$$XMMRegister, dst_vlen_enc); break; case T_DOUBLE: - __ vcvtdq2pd($dst$$XMMRegister, $dst$$XMMRegister, dst_vlen_enc); + __ vcvtdq2pd($dst$$XMMRegister, $src$$XMMRegister, dst_vlen_enc); break; default: ShouldNotReachHere(); diff --git a/test/hotspot/jtreg/ProblemList.txt b/test/hotspot/jtreg/ProblemList.txt index b3e334f35e5..e44331f9d09 100644 --- a/test/hotspot/jtreg/ProblemList.txt +++ b/test/hotspot/jtreg/ProblemList.txt @@ -77,9 +77,6 @@ compiler/rtm/print/TestPrintPreciseRTMLockingStatistics.java 8183263 generic-x64 compiler/c2/Test8004741.java 8235801 generic-all -compiler/vectorapi/VectorCastShape128Test.java 8269952 generic-x64 -compiler/vectorapi/VectorCastShape64Test.java 8269952 generic-x64 - ############################################################################# # :hotspot_gc