< prev index next >

src/hotspot/share/opto/vectorIntrinsics.cpp

Print this page
@@ -355,12 +355,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 || vector_klass == nullptr || elem_klass == nullptr || vlen == nullptr ||
-       !opr->is_con() || vector_klass->const_oop() == nullptr || elem_klass->const_oop() == nullptr || !vlen->is_con()) {
+   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()) {
      if (C->print_intrinsics()) {
        tty->print_cr("  ** missing constant: opr=%s vclass=%s etype=%s vlen=%s",
                      NodeClassNames[argument(0)->Opcode()],
                      NodeClassNames[argument(1)->Opcode()],
                      NodeClassNames[argument(3)->Opcode()],

@@ -590,12 +592,14 @@
    const TypeInt*     start_val     = gvn().type(argument(4))->isa_int();
    const TypeInt*     step_val      = gvn().type(argument(5))->isa_int();
    const TypeInt*     wrap          = gvn().type(argument(6))->isa_int();
  
    if (shuffle_klass == nullptr || shuffle_klass->const_oop() == nullptr ||
-       vlen == nullptr || !vlen->is_con() || start_val == nullptr || step_val == nullptr ||
-       wrap == nullptr || !wrap->is_con()) {
+       vlen          == nullptr || !vlen->is_con() ||
+       start_val     == nullptr ||
+       step_val      == nullptr ||
+       wrap          == nullptr || !wrap->is_con()) {
      return false; // not enough info for intrinsification
    }
  
    if (!is_klass_initialized(shuffle_klass)) {
      if (C->print_intrinsics()) {

@@ -700,11 +704,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 || elem_klass == nullptr || mask->is_top() || vlen == nullptr) {
+   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)) {
      if (C->print_intrinsics()) {

@@ -767,11 +775,11 @@
    const TypeInt*     vlen          = gvn().type(argument(4))->isa_int();
  
    if (vector_klass == nullptr || elem_klass == nullptr || shuffle_klass == nullptr || shuffle->is_top() || vlen == nullptr) {
      return false; // dead code
    }
-   if (!vlen->is_con() || vector_klass->const_oop() == nullptr || shuffle_klass->const_oop() == nullptr) {
+   if (vector_klass->const_oop() == nullptr || elem_klass->const_oop() == nullptr || shuffle_klass->const_oop() == nullptr || !vlen->is_con()) {
      return false; // not enough info for intrinsification
    }
    if (!is_klass_initialized(shuffle_klass) || !is_klass_initialized(vector_klass) ) {
      if (C->print_intrinsics()) {
        tty->print_cr("  ** klass argument not initialized");

@@ -832,13 +840,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 || 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()) {
+   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()) {
      if (C->print_intrinsics()) {
        tty->print_cr("  ** missing constant: vclass=%s etype=%s vlen=%s bitwise=%s",
                      NodeClassNames[argument(0)->Opcode()],
                      NodeClassNames[argument(1)->Opcode()],
                      NodeClassNames[argument(2)->Opcode()],

@@ -968,12 +978,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 || elem_klass == nullptr || vlen == nullptr || !from_ms->is_con() ||
-       vector_klass->const_oop() == nullptr || elem_klass->const_oop() == nullptr || !vlen->is_con()) {
+   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()) {
      if (C->print_intrinsics()) {
        tty->print_cr("  ** missing constant: vclass=%s etype=%s vlen=%s from_ms=%s",
                      NodeClassNames[argument(0)->Opcode()],
                      NodeClassNames[argument(1)->Opcode()],
                      NodeClassNames[argument(2)->Opcode()],

@@ -1180,13 +1192,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 || 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()) {
+   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()) {
      if (C->print_intrinsics()) {
        tty->print_cr("  ** 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()],

@@ -1443,12 +1457,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 || 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()) {
+   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) {
      if (C->print_intrinsics()) {
        tty->print_cr("  ** missing constant: vclass=%s etype=%s vlen=%s viclass=%s",
                      NodeClassNames[argument(0)->Opcode()],
                      NodeClassNames[argument(2)->Opcode()],
                      NodeClassNames[argument(3)->Opcode()],

@@ -1635,12 +1652,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 || vector_klass == nullptr || elem_klass == nullptr || vlen == nullptr ||
-       !opr->is_con() || vector_klass->const_oop() == nullptr || elem_klass->const_oop() == nullptr || !vlen->is_con()) {
+   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()) {
      if (C->print_intrinsics()) {
        tty->print_cr("  ** missing constant: opr=%s vclass=%s etype=%s vlen=%s",
                      NodeClassNames[argument(0)->Opcode()],
                      NodeClassNames[argument(1)->Opcode()],
                      NodeClassNames[argument(3)->Opcode()],

@@ -1788,12 +1808,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 || vector_klass == nullptr || elem_klass == nullptr || vlen == nullptr ||
-       !cond->is_con() || vector_klass->const_oop() == nullptr || elem_klass->const_oop() == nullptr || !vlen->is_con()) {
+   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()) {
      if (C->print_intrinsics()) {
        tty->print_cr("  ** missing constant: cond=%s vclass=%s etype=%s vlen=%s",
                      NodeClassNames[argument(0)->Opcode()],
                      NodeClassNames[argument(1)->Opcode()],
                      NodeClassNames[argument(2)->Opcode()],

@@ -2718,11 +2740,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()) {
+   if (vector_klass->const_oop() == nullptr || elem_klass->const_oop() == nullptr || !vlen->is_con() || !idx->is_con()) {
      if (C->print_intrinsics()) {
        tty->print_cr("  ** missing constant: vclass=%s etype=%s vlen=%s",
                      NodeClassNames[argument(0)->Opcode()],
                      NodeClassNames[argument(1)->Opcode()],
                      NodeClassNames[argument(2)->Opcode()]);

@@ -2847,13 +2869,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 (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()) {
+   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()) {
      if (C->print_intrinsics()) {
        tty->print_cr("  ** missing constant: opr=%s vclass=%s mclass=%s etype=%s vlen=%s",
                      NodeClassNames[argument(0)->Opcode()],
                      NodeClassNames[argument(1)->Opcode()],
                      NodeClassNames[argument(2)->Opcode()],

@@ -2940,13 +2964,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) {
+   if (vector_klass == nullptr || vector_klass->const_oop() == nullptr ||
+       elem_klass   == nullptr || elem_klass->const_oop()   == nullptr ||
+       vlen         == nullptr || !vlen->is_con() ) {
      if (C->print_intrinsics()) {
        tty->print_cr("  ** missing constant: vclass=%s etype=%s vlen=%s",
                      NodeClassNames[argument(0)->Opcode()],
                      NodeClassNames[argument(1)->Opcode()],
                      NodeClassNames[argument(2)->Opcode()]);

@@ -3090,12 +3114,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 || elem_klass == nullptr || vlen == nullptr ||
-       mask_klass->const_oop() == nullptr || elem_klass->const_oop() == nullptr || !vlen->is_con()) {
+   if (mask_klass == nullptr || mask_klass->const_oop() == nullptr ||
+       elem_klass == nullptr || elem_klass->const_oop() == nullptr ||
+       vlen       == nullptr || !vlen->is_con()) {
      if (C->print_intrinsics()) {
        tty->print_cr("  ** missing constant: mclass=%s etype=%s vlen=%s",
                      NodeClassNames[argument(0)->Opcode()],
                      NodeClassNames[argument(1)->Opcode()],
                      NodeClassNames[argument(2)->Opcode()]);
< prev index next >