< prev index next >

src/hotspot/share/opto/type.cpp

Print this page
*** 995,11 ***
      return Type::TOP;           // Canonical empty value
    return ft;
  }
  
  //------------------------------xdual------------------------------------------
- 
  const Type *Type::xdual() const {
    // Note: the base() accessor asserts the sanity of _base.
    assert(_type_info[base()].dual_type != Bad, "implement with v-call");
    return new Type(_type_info[_base].dual_type);
  }
--- 995,10 ---

*** 2357,11 ***
  const TypeVect *TypeVect::VECTY = NULL; // 256-bit vectors
  const TypeVect *TypeVect::VECTZ = NULL; // 512-bit vectors
  const TypeVect *TypeVect::VECTMASK = NULL; // predicate/mask vector
  
  //------------------------------make-------------------------------------------
! const TypeVect* TypeVect::make(const Type *elem, uint length) {
    BasicType elem_bt = elem->array_element_basic_type();
    assert(is_java_primitive(elem_bt), "only primitive types in vector");
    assert(Matcher::vector_size_supported(elem_bt, length), "length in range");
    int size = length * type2aelembytes(elem_bt);
    switch (Matcher::vector_ideal_reg(size)) {
--- 2356,14 ---
  const TypeVect *TypeVect::VECTY = NULL; // 256-bit vectors
  const TypeVect *TypeVect::VECTZ = NULL; // 512-bit vectors
  const TypeVect *TypeVect::VECTMASK = NULL; // predicate/mask vector
  
  //------------------------------make-------------------------------------------
! const TypeVect* TypeVect::make(const Type *elem, uint length, bool is_mask) {
+   if (is_mask) {
+     return makemask(elem, length);
+   }
    BasicType elem_bt = elem->array_element_basic_type();
    assert(is_java_primitive(elem_bt), "only primitive types in vector");
    assert(Matcher::vector_size_supported(elem_bt, length), "length in range");
    int size = length * type2aelembytes(elem_bt);
    switch (Matcher::vector_ideal_reg(size)) {

*** 2383,11 ***
   ShouldNotReachHere();
    return NULL;
  }
  
  const TypeVect *TypeVect::makemask(const Type* elem, uint length) {
!   if (Matcher::has_predicated_vectors()) {
      const TypeVect* mtype = Matcher::predicate_reg_type(elem, length);
      return (TypeVect*)(const_cast<TypeVect*>(mtype))->hashcons();
    } else {
      return make(elem, length);
    }
--- 2385,13 ---
   ShouldNotReachHere();
    return NULL;
  }
  
  const TypeVect *TypeVect::makemask(const Type* elem, uint length) {
!   BasicType elem_bt = elem->array_element_basic_type();
+   if (Matcher::has_predicated_vectors() &&
+       Matcher::match_rule_supported_vector_masked(Op_VectorLoadMask, length, elem_bt)) {
      const TypeVect* mtype = Matcher::predicate_reg_type(elem, length);
      return (TypeVect*)(const_cast<TypeVect*>(mtype))->hashcons();
    } else {
      return make(elem, length);
    }
< prev index next >