JDK-8275025 : Unable to inline vectmask convert
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: repo-panama
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2021-10-11
  • Updated: 2024-04-19
  • Resolved: 2021-10-11
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
repo-panamaFixed
Related Reports
Relates :  
Description
Due to incorrect vectmask type checking in inline_vector_convert(), vectmask cast operations are not able to inline. Should be:

@@ -2414,8 +2414,8 @@ bool LibraryCallKit::inline_vector_convert() {
   // where certain masks (depending on the species) are either propagated
   // through a vector or predicate register.
   if (is_mask &&
-      ((src_type->isa_vect() && dst_type->isa_vectmask()) ||
-      (dst_type->isa_vect() && src_type->isa_vectmask()))) {
+      ((src_type->isa_vectmask() == NULL && dst_type->isa_vectmask()) ||
+       (dst_type->isa_vectmask() == NULL && src_type->isa_vectmask()))) {
     return false;
   }
Comments
Patch: diff --git a/src/hotspot/share/opto/vectorIntrinsics.cpp b/src/hotspot/share/opto/vectorIntrinsics.cpp index 70f84104b9b..198f43efada 100644 --- a/src/hotspot/share/opto/vectorIntrinsics.cpp +++ b/src/hotspot/share/opto/vectorIntrinsics.cpp @@ -2414,8 +2414,8 @@ bool LibraryCallKit::inline_vector_convert() { // where certain masks (depending on the species) are either propagated // through a vector or predicate register. if (is_mask && - ((src_type->isa_vect() && dst_type->isa_vectmask()) || - (dst_type->isa_vect() && src_type->isa_vectmask()))) { + ((src_type->isa_vectmask() == NULL && dst_type->isa_vectmask()) || + (dst_type->isa_vectmask() == NULL && src_type->isa_vectmask()))) { return false; } @@ -2481,8 +2481,8 @@ bool LibraryCallKit::inline_vector_convert() { op = gvn().transform(VectorCastNode::make(cast_vopc, op, elem_bt_to, num_elem_to)); } else { if (is_mask) { - if((dst_type->isa_vectmask() && src_type->isa_vectmask()) || - (type2aelembytes(elem_bt_from) == type2aelembytes(elem_bt_to))) { + if ((dst_type->isa_vectmask() && src_type->isa_vectmask()) || + (type2aelembytes(elem_bt_from) == type2aelembytes(elem_bt_to))) { op = gvn().transform(new VectorMaskCastNode(op, dst_type)); } else { // Special handling for casting operation involving floating point types.
11-10-2021