< prev index next >

src/hotspot/share/opto/compile.cpp

Print this page

        

@@ -2788,10 +2788,19 @@
     // TODO: ensure that expanded vbox is initialized with the same value (vect).
     return vbox; // already expanded
   }
 }
 
+static const char * get_field_name(ciInstanceKlass * box_class) {
+   if(box_class->is_vectormask())
+      return "bits";
+   else if (box_class->is_vectorshuffle())
+      return "reorder";
+   else
+      return "vec";
+}
+
 Node* Compile::expand_vbox_alloc_node(VectorBoxAllocateNode* vbox_alloc,
                                       Node* value,
                                       const TypeInstPtr* box_type,
                                       const TypeVect* vect_type) {
   JVMState* jvms = clone_jvms(C, vbox_alloc);

@@ -2836,11 +2845,11 @@
                                                      num_elem));
   kit.set_memory(vstore, arr_adr_type);
 
 
   // Store the allocated array into object.
-  ciField* field = box_klass->get_field_by_name(ciSymbol::make(is_mask ? "bits" : "vec"),
+  ciField* field = box_klass->get_field_by_name(ciSymbol::make(get_field_name(box_klass)),
                                                 ciSymbol::make(TypeArrayKlass::external_name(bt)),
                                                 false);
   Node* vec_field = kit.basic_plus_adr(vec_obj, field->offset_in_bytes());
   const TypePtr* vec_adr_type = vec_field->bottom_type()->is_ptr();
   Node* field_store = gvn.transform(kit.access_store_at(vec_obj,
< prev index next >