< prev index next >

src/hotspot/share/opto/vectorIntrinsics.cpp

Print this page
*** 317,12 ***
    const TypeInstPtr* vector_klass = gvn().type(argument(1))->isa_instptr();
    const TypeInstPtr* mask_klass   = gvn().type(argument(2))->isa_instptr();
    const TypeInstPtr* elem_klass   = gvn().type(argument(3))->isa_instptr();
    const TypeInt*     vlen         = gvn().type(argument(4))->isa_int();
  
!   if (opr == nullptr || vector_klass == nullptr || elem_klass == nullptr || vlen == nullptr ||
!       !opr->is_con() || vector_klass->const_oop() == nullptr || elem_klass->const_oop() == nullptr || !vlen->is_con()) {
      log_if_needed("  ** missing constant: opr=%s vclass=%s etype=%s vlen=%s",
                      NodeClassNames[argument(0)->Opcode()],
                      NodeClassNames[argument(1)->Opcode()],
                      NodeClassNames[argument(3)->Opcode()],
                      NodeClassNames[argument(4)->Opcode()]);
--- 317,14 ---
    const TypeInstPtr* vector_klass = gvn().type(argument(1))->isa_instptr();
    const TypeInstPtr* mask_klass   = gvn().type(argument(2))->isa_instptr();
    const TypeInstPtr* elem_klass   = gvn().type(argument(3))->isa_instptr();
    const TypeInt*     vlen         = gvn().type(argument(4))->isa_int();
  
!   if (opr          == nullptr || !opr->is_con() ||
!       vector_klass == nullptr || vector_klass->const_oop() == nullptr ||
+       elem_klass   == nullptr || elem_klass->const_oop()   == nullptr ||
+       vlen         == nullptr || !vlen->is_con()) {
      log_if_needed("  ** missing constant: opr=%s vclass=%s etype=%s vlen=%s",
                      NodeClassNames[argument(0)->Opcode()],
                      NodeClassNames[argument(1)->Opcode()],
                      NodeClassNames[argument(3)->Opcode()],
                      NodeClassNames[argument(4)->Opcode()]);

*** 519,11 ***
    const TypeInstPtr* mask_klass = gvn().type(argument(1))->isa_instptr();
    const TypeInstPtr* elem_klass = gvn().type(argument(2))->isa_instptr();
    const TypeInt*     vlen       = gvn().type(argument(3))->isa_int();
    Node*              mask       = argument(4);
  
!   if (mask_klass == nullptr || elem_klass == nullptr || mask->is_top() || vlen == nullptr) {
      return false; // dead code
    }
  
    if (!is_klass_initialized(mask_klass)) {
      log_if_needed("  ** klass argument not initialized");
--- 521,15 ---
    const TypeInstPtr* mask_klass = gvn().type(argument(1))->isa_instptr();
    const TypeInstPtr* elem_klass = gvn().type(argument(2))->isa_instptr();
    const TypeInt*     vlen       = gvn().type(argument(3))->isa_int();
    Node*              mask       = argument(4);
  
!   if (mask_klass == nullptr || mask_klass->const_oop() == nullptr ||
+       elem_klass == nullptr || elem_klass->const_oop() == nullptr ||
+       vlen       == nullptr || !vlen->is_con() ||
+       oper       == nullptr || !oper->is_con() ||
+       mask->is_top()) {
      return false; // dead code
    }
  
    if (!is_klass_initialized(mask_klass)) {
      log_if_needed("  ** klass argument not initialized");

*** 579,13 ***
    // Mode argument determines the mode of operation it can take following values:-
    // MODE_BROADCAST for vector Vector.broadcast and VectorMask.maskAll operations.
    // MODE_BITS_COERCED_LONG_TO_MASK for VectorMask.fromLong operation.
    const TypeInt*     mode         = gvn().type(argument(5))->isa_int();
  
!   if (vector_klass == nullptr || elem_klass == nullptr || vlen == nullptr || mode == nullptr ||
!       bits_type == nullptr || vector_klass->const_oop() == nullptr || elem_klass->const_oop() == nullptr ||
!       !vlen->is_con() || !mode->is_con()) {
      log_if_needed("  ** missing constant: vclass=%s etype=%s vlen=%s bitwise=%s",
                      NodeClassNames[argument(0)->Opcode()],
                      NodeClassNames[argument(1)->Opcode()],
                      NodeClassNames[argument(2)->Opcode()],
                      NodeClassNames[argument(5)->Opcode()]);
--- 585,15 ---
    // Mode argument determines the mode of operation it can take following values:-
    // MODE_BROADCAST for vector Vector.broadcast and VectorMask.maskAll operations.
    // MODE_BITS_COERCED_LONG_TO_MASK for VectorMask.fromLong operation.
    const TypeInt*     mode         = gvn().type(argument(5))->isa_int();
  
!   if (vector_klass == nullptr || vector_klass->const_oop() == nullptr ||
!       elem_klass   == nullptr || elem_klass->const_oop()   == nullptr ||
!       vlen         == nullptr || !vlen->is_con() ||
+       bits_type    == nullptr ||
+       mode         == nullptr || !mode->is_con()) {
      log_if_needed("  ** missing constant: vclass=%s etype=%s vlen=%s bitwise=%s",
                      NodeClassNames[argument(0)->Opcode()],
                      NodeClassNames[argument(1)->Opcode()],
                      NodeClassNames[argument(2)->Opcode()],
                      NodeClassNames[argument(5)->Opcode()]);

*** 707,12 ***
    const TypeInstPtr* vector_klass = gvn().type(argument(0))->isa_instptr();
    const TypeInstPtr* elem_klass   = gvn().type(argument(1))->isa_instptr();
    const TypeInt*     vlen         = gvn().type(argument(2))->isa_int();
    const TypeInt*     from_ms      = gvn().type(argument(6))->isa_int();
  
!   if (vector_klass == nullptr || elem_klass == nullptr || vlen == nullptr || !from_ms->is_con() ||
!       vector_klass->const_oop() == nullptr || elem_klass->const_oop() == nullptr || !vlen->is_con()) {
      log_if_needed("  ** missing constant: vclass=%s etype=%s vlen=%s from_ms=%s",
                      NodeClassNames[argument(0)->Opcode()],
                      NodeClassNames[argument(1)->Opcode()],
                      NodeClassNames[argument(2)->Opcode()],
                      NodeClassNames[argument(6)->Opcode()]);
--- 715,14 ---
    const TypeInstPtr* vector_klass = gvn().type(argument(0))->isa_instptr();
    const TypeInstPtr* elem_klass   = gvn().type(argument(1))->isa_instptr();
    const TypeInt*     vlen         = gvn().type(argument(2))->isa_int();
    const TypeInt*     from_ms      = gvn().type(argument(6))->isa_int();
  
!   if (vector_klass == nullptr || vector_klass->const_oop() == nullptr ||
!       elem_klass   == nullptr || elem_klass->const_oop()   == nullptr ||
+       vlen         == nullptr || !vlen->is_con() ||
+       from_ms      == nullptr || !from_ms->is_con()) {
      log_if_needed("  ** missing constant: vclass=%s etype=%s vlen=%s from_ms=%s",
                      NodeClassNames[argument(0)->Opcode()],
                      NodeClassNames[argument(1)->Opcode()],
                      NodeClassNames[argument(2)->Opcode()],
                      NodeClassNames[argument(6)->Opcode()]);

*** 915,13 ***
    const TypeInstPtr* mask_klass   = gvn().type(argument(1))->isa_instptr();
    const TypeInstPtr* elem_klass   = gvn().type(argument(2))->isa_instptr();
    const TypeInt*     vlen         = gvn().type(argument(3))->isa_int();
    const TypeInt*     from_ms      = gvn().type(argument(7))->isa_int();
  
!   if (vector_klass == nullptr || mask_klass == nullptr || elem_klass == nullptr || vlen == nullptr ||
!       vector_klass->const_oop() == nullptr || mask_klass->const_oop() == nullptr || from_ms == nullptr ||
!       elem_klass->const_oop() == nullptr || !vlen->is_con() || !from_ms->is_con()) {
      log_if_needed("  ** missing constant: vclass=%s mclass=%s etype=%s vlen=%s from_ms=%s",
                      NodeClassNames[argument(0)->Opcode()],
                      NodeClassNames[argument(1)->Opcode()],
                      NodeClassNames[argument(2)->Opcode()],
                      NodeClassNames[argument(3)->Opcode()],
--- 925,15 ---
    const TypeInstPtr* mask_klass   = gvn().type(argument(1))->isa_instptr();
    const TypeInstPtr* elem_klass   = gvn().type(argument(2))->isa_instptr();
    const TypeInt*     vlen         = gvn().type(argument(3))->isa_int();
    const TypeInt*     from_ms      = gvn().type(argument(7))->isa_int();
  
!   if (vector_klass == nullptr || vector_klass->const_oop() == nullptr ||
!       mask_klass   == nullptr || mask_klass->const_oop()   == nullptr ||
!       elem_klass   == nullptr || elem_klass->const_oop()   == nullptr ||
+       vlen         == nullptr || !vlen->is_con() ||
+       from_ms      == nullptr || !from_ms->is_con()) {
      log_if_needed("  ** missing constant: vclass=%s mclass=%s etype=%s vlen=%s from_ms=%s",
                      NodeClassNames[argument(0)->Opcode()],
                      NodeClassNames[argument(1)->Opcode()],
                      NodeClassNames[argument(2)->Opcode()],
                      NodeClassNames[argument(3)->Opcode()],

*** 1154,12 ***
    const TypeInstPtr* mask_klass       = gvn().type(argument(1))->isa_instptr();
    const TypeInstPtr* elem_klass       = gvn().type(argument(2))->isa_instptr();
    const TypeInt*     vlen             = gvn().type(argument(3))->isa_int();
    const TypeInstPtr* vector_idx_klass = gvn().type(argument(4))->isa_instptr();
  
!   if (vector_klass == nullptr || elem_klass == nullptr || vector_idx_klass == nullptr || vlen == nullptr ||
!       vector_klass->const_oop() == nullptr || elem_klass->const_oop() == nullptr || vector_idx_klass->const_oop() == nullptr || !vlen->is_con()) {
      log_if_needed("  ** missing constant: vclass=%s etype=%s vlen=%s viclass=%s",
                      NodeClassNames[argument(0)->Opcode()],
                      NodeClassNames[argument(2)->Opcode()],
                      NodeClassNames[argument(3)->Opcode()],
                      NodeClassNames[argument(4)->Opcode()]);
--- 1166,15 ---
    const TypeInstPtr* mask_klass       = gvn().type(argument(1))->isa_instptr();
    const TypeInstPtr* elem_klass       = gvn().type(argument(2))->isa_instptr();
    const TypeInt*     vlen             = gvn().type(argument(3))->isa_int();
    const TypeInstPtr* vector_idx_klass = gvn().type(argument(4))->isa_instptr();
  
!   if (vector_klass     == nullptr || vector_klass->const_oop()     == nullptr ||
! //      mask_klass       == nullptr || mask_klass->const_oop()       == nullptr ||
+       elem_klass       == nullptr || elem_klass->const_oop()       == nullptr ||
+       vlen             == nullptr || !vlen->is_con() ||
+       vector_idx_klass == nullptr || vector_idx_klass->const_oop() == nullptr) {
      log_if_needed("  ** missing constant: vclass=%s etype=%s vlen=%s viclass=%s",
                      NodeClassNames[argument(0)->Opcode()],
                      NodeClassNames[argument(2)->Opcode()],
                      NodeClassNames[argument(3)->Opcode()],
                      NodeClassNames[argument(4)->Opcode()]);

*** 1341,12 ***
    const TypeInstPtr* vector_klass = gvn().type(argument(1))->isa_instptr();
    const TypeInstPtr* mask_klass   = gvn().type(argument(2))->isa_instptr();
    const TypeInstPtr* elem_klass   = gvn().type(argument(3))->isa_instptr();
    const TypeInt*     vlen         = gvn().type(argument(4))->isa_int();
  
!   if (opr == nullptr || vector_klass == nullptr || elem_klass == nullptr || vlen == nullptr ||
!       !opr->is_con() || vector_klass->const_oop() == nullptr || elem_klass->const_oop() == nullptr || !vlen->is_con()) {
      log_if_needed("  ** missing constant: opr=%s vclass=%s etype=%s vlen=%s",
                      NodeClassNames[argument(0)->Opcode()],
                      NodeClassNames[argument(1)->Opcode()],
                      NodeClassNames[argument(3)->Opcode()],
                      NodeClassNames[argument(4)->Opcode()]);
--- 1356,15 ---
    const TypeInstPtr* vector_klass = gvn().type(argument(1))->isa_instptr();
    const TypeInstPtr* mask_klass   = gvn().type(argument(2))->isa_instptr();
    const TypeInstPtr* elem_klass   = gvn().type(argument(3))->isa_instptr();
    const TypeInt*     vlen         = gvn().type(argument(4))->isa_int();
  
!   if (opr          == nullptr || !opr->is_con() ||
!       vector_klass == nullptr || vector_klass->const_oop() == nullptr ||
+ //      mask_klass   == nullptr || mask_klass->const_oop()   == nullptr ||
+       elem_klass   == nullptr || elem_klass->const_oop()   == nullptr ||
+       vlen         == nullptr || !vlen->is_con()) {
      log_if_needed("  ** missing constant: opr=%s vclass=%s etype=%s vlen=%s",
                      NodeClassNames[argument(0)->Opcode()],
                      NodeClassNames[argument(1)->Opcode()],
                      NodeClassNames[argument(3)->Opcode()],
                      NodeClassNames[argument(4)->Opcode()]);

*** 1479,12 ***
    const TypeInt*     cond         = gvn().type(argument(0))->isa_int();
    const TypeInstPtr* vector_klass = gvn().type(argument(1))->isa_instptr();
    const TypeInstPtr* elem_klass   = gvn().type(argument(2))->isa_instptr();
    const TypeInt*     vlen         = gvn().type(argument(3))->isa_int();
  
!   if (cond == nullptr || vector_klass == nullptr || elem_klass == nullptr || vlen == nullptr ||
!       !cond->is_con() || vector_klass->const_oop() == nullptr || elem_klass->const_oop() == nullptr || !vlen->is_con()) {
      log_if_needed("  ** missing constant: cond=%s vclass=%s etype=%s vlen=%s",
                      NodeClassNames[argument(0)->Opcode()],
                      NodeClassNames[argument(1)->Opcode()],
                      NodeClassNames[argument(2)->Opcode()],
                      NodeClassNames[argument(3)->Opcode()]);
--- 1497,14 ---
    const TypeInt*     cond         = gvn().type(argument(0))->isa_int();
    const TypeInstPtr* vector_klass = gvn().type(argument(1))->isa_instptr();
    const TypeInstPtr* elem_klass   = gvn().type(argument(2))->isa_instptr();
    const TypeInt*     vlen         = gvn().type(argument(3))->isa_int();
  
!   if (cond         == nullptr || !cond->is_con() ||
!       vector_klass == nullptr || vector_klass->const_oop() == nullptr ||
+       elem_klass   == nullptr || elem_klass->const_oop()   == nullptr ||
+       vlen         == nullptr || !vlen->is_con()) {
      log_if_needed("  ** missing constant: cond=%s vclass=%s etype=%s vlen=%s",
                      NodeClassNames[argument(0)->Opcode()],
                      NodeClassNames[argument(1)->Opcode()],
                      NodeClassNames[argument(2)->Opcode()],
                      NodeClassNames[argument(3)->Opcode()]);

*** 2510,11 ***
    const TypeInt*     idx          = gvn().type(argument(4))->isa_int();
  
    if (vector_klass == nullptr || elem_klass == nullptr || vlen == nullptr || idx == nullptr) {
      return false; // dead code
    }
!   if (vector_klass->const_oop() == nullptr || elem_klass->const_oop() == nullptr || !vlen->is_con()) {
      log_if_needed("  ** missing constant: vclass=%s etype=%s vlen=%s",
                      NodeClassNames[argument(0)->Opcode()],
                      NodeClassNames[argument(1)->Opcode()],
                      NodeClassNames[argument(2)->Opcode()]);
      return false; // not enough info for intrinsification
--- 2530,11 ---
    const TypeInt*     idx          = gvn().type(argument(4))->isa_int();
  
    if (vector_klass == nullptr || elem_klass == nullptr || vlen == nullptr || idx == nullptr) {
      return false; // dead code
    }
!   if (vector_klass->const_oop() == nullptr || elem_klass->const_oop() == nullptr || !vlen->is_con() || !idx->is_con()) {
      log_if_needed("  ** missing constant: vclass=%s etype=%s vlen=%s",
                      NodeClassNames[argument(0)->Opcode()],
                      NodeClassNames[argument(1)->Opcode()],
                      NodeClassNames[argument(2)->Opcode()]);
      return false; // not enough info for intrinsification

*** 2813,13 ***
    const TypeInstPtr* vector_klass = gvn().type(argument(1))->isa_instptr();
    const TypeInstPtr* mask_klass   = gvn().type(argument(2))->isa_instptr();
    const TypeInstPtr* elem_klass   = gvn().type(argument(3))->isa_instptr();
    const TypeInt*     vlen         = gvn().type(argument(4))->isa_int();
  
!   if (vector_klass == nullptr || elem_klass == nullptr || mask_klass == nullptr || vlen == nullptr ||
!       vector_klass->const_oop() == nullptr || mask_klass->const_oop() == nullptr ||
!       elem_klass->const_oop() == nullptr || !vlen->is_con() || !opr->is_con()) {
      log_if_needed("  ** missing constant: opr=%s vclass=%s mclass=%s etype=%s vlen=%s",
                      NodeClassNames[argument(0)->Opcode()],
                      NodeClassNames[argument(1)->Opcode()],
                      NodeClassNames[argument(2)->Opcode()],
                      NodeClassNames[argument(3)->Opcode()],
--- 2833,15 ---
    const TypeInstPtr* vector_klass = gvn().type(argument(1))->isa_instptr();
    const TypeInstPtr* mask_klass   = gvn().type(argument(2))->isa_instptr();
    const TypeInstPtr* elem_klass   = gvn().type(argument(3))->isa_instptr();
    const TypeInt*     vlen         = gvn().type(argument(4))->isa_int();
  
!   if (opr          == nullptr || !opr->is_con() ||
!       vector_klass == nullptr || vector_klass->const_oop() == nullptr ||
!       mask_klass   == nullptr || mask_klass->const_oop()   == nullptr ||
+       elem_klass   == nullptr || elem_klass->const_oop()   == nullptr ||
+       vlen         == nullptr || !vlen->is_con()) {
      log_if_needed("  ** missing constant: opr=%s vclass=%s mclass=%s etype=%s vlen=%s",
                      NodeClassNames[argument(0)->Opcode()],
                      NodeClassNames[argument(1)->Opcode()],
                      NodeClassNames[argument(2)->Opcode()],
                      NodeClassNames[argument(3)->Opcode()],

*** 2894,13 ***
  bool LibraryCallKit::inline_index_vector() {
    const TypeInstPtr* vector_klass = gvn().type(argument(0))->isa_instptr();
    const TypeInstPtr* elem_klass   = gvn().type(argument(1))->isa_instptr();
    const TypeInt*     vlen         = gvn().type(argument(2))->isa_int();
  
!   if (vector_klass == nullptr || elem_klass == nullptr || vlen == nullptr ||
!       vector_klass->const_oop() == nullptr || !vlen->is_con() ||
!       elem_klass->const_oop() == nullptr) {
      log_if_needed("  ** missing constant: vclass=%s etype=%s vlen=%s",
                      NodeClassNames[argument(0)->Opcode()],
                      NodeClassNames[argument(1)->Opcode()],
                      NodeClassNames[argument(2)->Opcode()]);
      return false; // not enough info for intrinsification
--- 2916,13 ---
  bool LibraryCallKit::inline_index_vector() {
    const TypeInstPtr* vector_klass = gvn().type(argument(0))->isa_instptr();
    const TypeInstPtr* elem_klass   = gvn().type(argument(1))->isa_instptr();
    const TypeInt*     vlen         = gvn().type(argument(2))->isa_int();
  
!   if (vector_klass == nullptr || vector_klass->const_oop() == nullptr ||
!       elem_klass   == nullptr || elem_klass->const_oop()   == nullptr ||
!       vlen         == nullptr || !vlen->is_con() ) {
      log_if_needed("  ** missing constant: vclass=%s etype=%s vlen=%s",
                      NodeClassNames[argument(0)->Opcode()],
                      NodeClassNames[argument(1)->Opcode()],
                      NodeClassNames[argument(2)->Opcode()]);
      return false; // not enough info for intrinsification

*** 3028,12 ***
  bool LibraryCallKit::inline_index_partially_in_upper_range() {
    const TypeInstPtr* mask_klass   = gvn().type(argument(0))->isa_instptr();
    const TypeInstPtr* elem_klass   = gvn().type(argument(1))->isa_instptr();
    const TypeInt*     vlen         = gvn().type(argument(2))->isa_int();
  
!   if (mask_klass == nullptr || elem_klass == nullptr || vlen == nullptr ||
!       mask_klass->const_oop() == nullptr || elem_klass->const_oop() == nullptr || !vlen->is_con()) {
      log_if_needed("  ** missing constant: mclass=%s etype=%s vlen=%s",
                      NodeClassNames[argument(0)->Opcode()],
                      NodeClassNames[argument(1)->Opcode()],
                      NodeClassNames[argument(2)->Opcode()]);
      return false; // not enough info for intrinsification
--- 3050,13 ---
  bool LibraryCallKit::inline_index_partially_in_upper_range() {
    const TypeInstPtr* mask_klass   = gvn().type(argument(0))->isa_instptr();
    const TypeInstPtr* elem_klass   = gvn().type(argument(1))->isa_instptr();
    const TypeInt*     vlen         = gvn().type(argument(2))->isa_int();
  
!   if (mask_klass == nullptr || mask_klass->const_oop() == nullptr ||
!       elem_klass == nullptr || elem_klass->const_oop() == nullptr ||
+       vlen       == nullptr || !vlen->is_con()) {
      log_if_needed("  ** missing constant: mclass=%s etype=%s vlen=%s",
                      NodeClassNames[argument(0)->Opcode()],
                      NodeClassNames[argument(1)->Opcode()],
                      NodeClassNames[argument(2)->Opcode()]);
      return false; // not enough info for intrinsification
< prev index next >