changeset 58385:0414dcc637d0 vectorIntrinsics

Fix cast byte to double in AVX512
author rlupusoru
date Thu, 23 Aug 2018 17:03:23 -0700
parents b135bbfcfcc2
children 7f84564ce3b7 833600014232
files src/hotspot/cpu/x86/assembler_x86.cpp src/hotspot/cpu/x86/x86.ad
diffstat 2 files changed, 5 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/src/hotspot/cpu/x86/assembler_x86.cpp	Wed Aug 22 16:47:22 2018 -0700
+++ b/src/hotspot/cpu/x86/assembler_x86.cpp	Thu Aug 23 17:03:23 2018 -0700
@@ -1803,7 +1803,7 @@
 
 void Assembler::vcvtdq2pd(XMMRegister dst, XMMRegister src, int vector_len) {
   assert(vector_len <= AVX_256bit ? VM_Version::supports_avx() : VM_Version::supports_evex(), "");
-  InstructionAttr attributes(vector_len, /* rex_w */ false, /* legacy_mode */ true, /* no_mask_reg */ true, /* uses_vl */ true);
+  InstructionAttr attributes(vector_len, /* rex_w */ false, /* legacy_mode */ false, /* no_mask_reg */ true, /* uses_vl */ true);
   int encode = simd_prefix_and_encode(dst, xnoreg, src, VEX_SIMD_F3, VEX_OPCODE_0F, &attributes);
   emit_int8((unsigned char)0xE6);
   emit_int8((unsigned char)(0xC0 | encode));
--- a/src/hotspot/cpu/x86/x86.ad	Wed Aug 22 16:47:22 2018 -0700
+++ b/src/hotspot/cpu/x86/x86.ad	Thu Aug 23 17:03:23 2018 -0700
@@ -18591,9 +18591,8 @@
   format %{ "vpmovsxbd   $dst,$src\n\t"
             "vcvtdq2pd   $dst,$dst\t! convert 4B to 4D vector" %}
   ins_encode %{
-    int vector_len = 1;
-    __ vpmovsxbd($dst$$XMMRegister, $src$$XMMRegister, vector_len);
-    __ vcvtdq2pd($dst$$XMMRegister, $dst$$XMMRegister, vector_len);
+    __ vpmovsxbd($dst$$XMMRegister, $src$$XMMRegister, 0);
+    __ vcvtdq2pd($dst$$XMMRegister, $dst$$XMMRegister, 1);
   %}
   ins_pipe( pipe_slow );
 %}
@@ -18604,9 +18603,8 @@
   format %{ "vpmovsxbd   $dst,$src\n\t"
             "vcvtdq2pd   $dst,$dst\t! convert 8B to 8D vector" %}
   ins_encode %{
-    int vector_len = 2;
-    __ vpmovsxbd($dst$$XMMRegister, $src$$XMMRegister, vector_len);
-    __ vcvtdq2pd($dst$$XMMRegister, $dst$$XMMRegister, vector_len);
+    __ vpmovsxbd($dst$$XMMRegister, $src$$XMMRegister, 1);
+    __ vcvtdq2pd($dst$$XMMRegister, $dst$$XMMRegister, 2);
   %}
   ins_pipe( pipe_slow );
 %}