@@ -6602,7 +6602,7 @@ instruct vcastBtoX(vec dst, vec src) %{
6602
6602
%}
6603
6603
6604
6604
instruct castStoX(vec dst, vec src, rRegP scratch) %{
6605
- predicate(UseAVX <= 2 &&
6605
+ predicate(( UseAVX <= 2 || !VM_Version::supports_avx512vlbw()) &&
6606
6606
vector_length(n->in(1)) <= 8 && // src
6607
6607
vector_element_basic_type(n) == T_BYTE);
6608
6608
effect(TEMP scratch);
@@ -6618,7 +6618,7 @@ instruct castStoX(vec dst, vec src, rRegP scratch) %{
6618
6618
%}
6619
6619
6620
6620
instruct vcastStoX(vec dst, vec src, vec vtmp, rRegP scratch) %{
6621
- predicate(UseAVX <= 2 &&
6621
+ predicate(( UseAVX <= 2 || !VM_Version::supports_avx512vlbw()) &&
6622
6622
vector_length(n->in(1)) == 16 && // src
6623
6623
vector_element_basic_type(n) == T_BYTE);
6624
6624
effect(TEMP dst, TEMP vtmp, TEMP scratch);
@@ -6636,7 +6636,7 @@ instruct vcastStoX(vec dst, vec src, vec vtmp, rRegP scratch) %{
6636
6636
%}
6637
6637
6638
6638
instruct vcastStoX_evex(vec dst, vec src) %{
6639
- predicate(UseAVX > 2 ||
6639
+ predicate(( UseAVX > 2 && VM_Version::supports_avx512vlbw()) ||
6640
6640
(vector_length_in_bytes(n) >= vector_length_in_bytes(n->in(1)))); // dst >= src
6641
6641
match(Set dst (VectorCastS2X src));
6642
6642
format %{ "vector_cast_s2x $dst,$src\t!" %}
@@ -6751,13 +6751,13 @@ instruct vcastItoX_evex(vec dst, vec src) %{
6751
6751
__ evpmovdw($dst$$XMMRegister, $src$$XMMRegister, src_vlen_enc);
6752
6752
break;
6753
6753
case T_FLOAT:
6754
- __ vcvtdq2ps($dst$$XMMRegister, $dst $$XMMRegister, dst_vlen_enc);
6754
+ __ vcvtdq2ps($dst$$XMMRegister, $src $$XMMRegister, dst_vlen_enc);
6755
6755
break;
6756
6756
case T_LONG:
6757
6757
__ vpmovsxdq($dst$$XMMRegister, $src$$XMMRegister, dst_vlen_enc);
6758
6758
break;
6759
6759
case T_DOUBLE:
6760
- __ vcvtdq2pd($dst$$XMMRegister, $dst $$XMMRegister, dst_vlen_enc);
6760
+ __ vcvtdq2pd($dst$$XMMRegister, $src $$XMMRegister, dst_vlen_enc);
6761
6761
break;
6762
6762
default:
6763
6763
ShouldNotReachHere();
0 commit comments