< prev index next >

src/hotspot/share/opto/vectornode.cpp

Print this page

        

*** 176,187 **** assert(bt == T_FLOAT, "must be"); return Op_SqrtVF; case Op_SqrtD: assert(bt == T_DOUBLE, "must be"); return Op_SqrtVD; - case Op_Not: - return Op_NotV; case Op_PopCountI: if (bt == T_INT) { return Op_PopCountVI; } // Unimplemented for subword types since bit count changes --- 176,185 ----
*** 283,296 **** case T_FLOAT: return Op_ReplicateF; case T_DOUBLE: return Op_ReplicateD; default: ! break; ! } ! return 0; } // Also used to check if the code generator // supports the vector operation. bool VectorNode::implemented(int opc, uint vlen, BasicType bt) { --- 281,293 ---- case T_FLOAT: return Op_ReplicateF; case T_DOUBLE: return Op_ReplicateD; default: ! assert(false, "wrong type: %s", type2name(bt)); return 0; + } } // Also used to check if the code generator // supports the vector operation. bool VectorNode::implemented(int opc, uint vlen, BasicType bt) {
*** 341,372 **** default: return false; } } - bool VectorNode::is_vshift(Node* n) { - switch (n->Opcode()) { - case Op_LShiftVB: - case Op_LShiftVS: - case Op_LShiftVI: - case Op_LShiftVL: - - case Op_RShiftVB: - case Op_RShiftVS: - case Op_RShiftVI: - case Op_RShiftVL: - - case Op_URShiftVB: - case Op_URShiftVS: - case Op_URShiftVI: - case Op_URShiftVL: - return true; - default: - return false; - } - } - bool VectorNode::is_vshift_cnt(Node* n) { switch (n->Opcode()) { case Op_LShiftCntV: case Op_RShiftCntV: return true; --- 338,347 ----
*** 471,481 **** case Op_DivVD: return new DivVDNode(n1, n2, vt); case Op_MinV: return new MinVNode(n1, n2, vt); case Op_MaxV: return new MaxVNode(n1, n2, vt); - case Op_AbsV: return new AbsVNode(n1, vt); case Op_AbsVF: return new AbsVFNode(n1, vt); case Op_AbsVD: return new AbsVDNode(n1, vt); case Op_AbsVB: return new AbsVBNode(n1, vt); case Op_AbsVS: return new AbsVSNode(n1, vt); case Op_AbsVI: return new AbsVINode(n1, vt); --- 446,455 ----
*** 487,497 **** case Op_SqrtVF: return new SqrtVFNode(n1, vt); case Op_SqrtVD: return new SqrtVDNode(n1, vt); case Op_PopCountVI: return new PopCountVINode(n1, vt); - case Op_NotV: return new NotVNode(n1, vt); case Op_LShiftVB: return new LShiftVBNode(n1, n2, vt); case Op_LShiftVS: return new LShiftVSNode(n1, n2, vt); case Op_LShiftVI: return new LShiftVINode(n1, n2, vt); case Op_LShiftVL: return new LShiftVLNode(n1, n2, vt); --- 461,470 ----
*** 504,518 **** case Op_URShiftVB: return new URShiftVBNode(n1, n2, vt); case Op_URShiftVS: return new URShiftVSNode(n1, n2, vt); case Op_URShiftVI: return new URShiftVINode(n1, n2, vt); case Op_URShiftVL: return new URShiftVLNode(n1, n2, vt); - // Variable shift left - case Op_VLShiftV: return new VLShiftVNode(n1, n2, vt); - case Op_VRShiftV: return new VRShiftVNode(n1, n2, vt); - case Op_VURShiftV: return new VURShiftVNode(n1, n2, vt); - case Op_AndV: return new AndVNode(n1, n2, vt); case Op_OrV: return new OrVNode (n1, n2, vt); case Op_XorV: return new XorVNode(n1, n2, vt); case Op_RoundDoubleModeV: return new RoundDoubleModeVNode(n1, n2, vt); --- 477,486 ----
*** 743,797 **** return new StoreVectorNode(ctl, mem, adr, atyp, val); } int ExtractNode::opcode(BasicType bt) { switch (bt) { ! case T_BOOLEAN: ! return Op_ExtractUB; ! case T_BYTE: ! return Op_ExtractB; ! case T_CHAR: ! return Op_ExtractC; ! case T_SHORT: ! return Op_ExtractS; ! case T_INT: ! return Op_ExtractI; ! case T_LONG: ! return Op_ExtractL; ! case T_FLOAT: ! return Op_ExtractF; ! case T_DOUBLE: ! return Op_ExtractD; default: ! fatal("Type '%s' is not supported for vectors", type2name(bt)); return 0; } } // Extract a scalar element of vector. Node* ExtractNode::make(Node* v, uint position, BasicType bt) { assert((int)position < Matcher::max_vector_size(bt), "pos in range"); ConINode* pos = ConINode::make((int)position); switch (bt) { ! case T_BOOLEAN: ! return new ExtractUBNode(v, pos); ! case T_BYTE: ! return new ExtractBNode(v, pos); ! case T_CHAR: ! return new ExtractCNode(v, pos); ! case T_SHORT: ! return new ExtractSNode(v, pos); ! case T_INT: ! return new ExtractINode(v, pos); ! case T_LONG: ! return new ExtractLNode(v, pos); ! case T_FLOAT: ! return new ExtractFNode(v, pos); ! case T_DOUBLE: ! return new ExtractDNode(v, pos); default: ! fatal("Type '%s' is not supported for vectors", type2name(bt)); return NULL; } } int ReductionNode::opcode(int opc, BasicType bt) { --- 711,749 ---- return new StoreVectorNode(ctl, mem, adr, atyp, val); } int ExtractNode::opcode(BasicType bt) { switch (bt) { ! case T_BOOLEAN: return Op_ExtractUB; ! case T_BYTE: return Op_ExtractB; ! case T_CHAR: return Op_ExtractC; ! case T_SHORT: return Op_ExtractS; ! case T_INT: return Op_ExtractI; ! case T_LONG: return Op_ExtractL; ! case T_FLOAT: return Op_ExtractF; ! case T_DOUBLE: return Op_ExtractD; default: ! assert(false, "wrong type: %s", type2name(bt)); return 0; } } // Extract a scalar element of vector. Node* ExtractNode::make(Node* v, uint position, BasicType bt) { assert((int)position < Matcher::max_vector_size(bt), "pos in range"); ConINode* pos = ConINode::make((int)position); switch (bt) { ! case T_BOOLEAN: return new ExtractUBNode(v, pos); ! case T_BYTE: return new ExtractBNode(v, pos); ! case T_CHAR: return new ExtractCNode(v, pos); ! case T_SHORT: return new ExtractSNode(v, pos); ! case T_INT: return new ExtractINode(v, pos); ! case T_LONG: return new ExtractLNode(v, pos); ! case T_FLOAT: return new ExtractFNode(v, pos); ! case T_DOUBLE: return new ExtractDNode(v, pos); default: ! assert(false, "wrong type: %s", type2name(bt)); return NULL; } } int ReductionNode::opcode(int opc, BasicType bt) {
*** 968,1007 **** case Op_MaxReductionV: return new MaxReductionVNode(ctrl, n1, n2); case Op_AndReductionV: return new AndReductionVNode(ctrl, n1, n2); case Op_OrReductionV: return new OrReductionVNode(ctrl, n1, n2); case Op_XorReductionV: return new XorReductionVNode(ctrl, n1, n2); default: ! fatal("Missed vector creation for '%s'", NodeClassNames[vopc]); return NULL; } } VectorCastNode* VectorCastNode::make(int vopc, Node* n1, BasicType bt, uint vlen) { const TypeVect* vt = TypeVect::make(bt, vlen); switch (vopc) { case Op_VectorCastB2X: return new VectorCastB2XNode(n1, vt); case Op_VectorCastS2X: return new VectorCastS2XNode(n1, vt); case Op_VectorCastI2X: return new VectorCastI2XNode(n1, vt); case Op_VectorCastL2X: return new VectorCastL2XNode(n1, vt); case Op_VectorCastF2X: return new VectorCastF2XNode(n1, vt); case Op_VectorCastD2X: return new VectorCastD2XNode(n1, vt); ! default: fatal("unknown node: %s", NodeClassNames[vopc]); ! } return NULL; } int VectorCastNode::opcode(BasicType bt) { switch (bt) { case T_BYTE: return Op_VectorCastB2X; case T_SHORT: return Op_VectorCastS2X; case T_INT: return Op_VectorCastI2X; case T_LONG: return Op_VectorCastL2X; case T_FLOAT: return Op_VectorCastF2X; case T_DOUBLE: return Op_VectorCastD2X; ! default: Unimplemented(); ! } return 0; } Node* ReductionNode::make_reduction_input(PhaseGVN& gvn, int opc, BasicType bt) { int vopc = opcode(opc, bt); guarantee(vopc != opc, "Vector reduction for '%s' is not implemented", NodeClassNames[opc]); --- 920,968 ---- case Op_MaxReductionV: return new MaxReductionVNode(ctrl, n1, n2); case Op_AndReductionV: return new AndReductionVNode(ctrl, n1, n2); case Op_OrReductionV: return new OrReductionVNode(ctrl, n1, n2); case Op_XorReductionV: return new XorReductionVNode(ctrl, n1, n2); default: ! assert(false, "unknown node: %s", NodeClassNames[vopc]); return NULL; } } + VectorStoreMaskNode* VectorStoreMaskNode::make(PhaseGVN& gvn, Node* in, BasicType in_type, uint num_elem) { + assert(in->bottom_type()->isa_vect(), "sanity"); + const TypeVect* vt = TypeVect::make(T_BOOLEAN, num_elem); + int elem_size = type2aelembytes(in_type); + return new VectorStoreMaskNode(in, gvn.intcon(elem_size), vt); + } + VectorCastNode* VectorCastNode::make(int vopc, Node* n1, BasicType bt, uint vlen) { const TypeVect* vt = TypeVect::make(bt, vlen); switch (vopc) { case Op_VectorCastB2X: return new VectorCastB2XNode(n1, vt); case Op_VectorCastS2X: return new VectorCastS2XNode(n1, vt); case Op_VectorCastI2X: return new VectorCastI2XNode(n1, vt); case Op_VectorCastL2X: return new VectorCastL2XNode(n1, vt); case Op_VectorCastF2X: return new VectorCastF2XNode(n1, vt); case Op_VectorCastD2X: return new VectorCastD2XNode(n1, vt); ! default: ! assert(false, "unknown node: %s", NodeClassNames[vopc]); return NULL; + } } int VectorCastNode::opcode(BasicType bt) { switch (bt) { case T_BYTE: return Op_VectorCastB2X; case T_SHORT: return Op_VectorCastS2X; case T_INT: return Op_VectorCastI2X; case T_LONG: return Op_VectorCastL2X; case T_FLOAT: return Op_VectorCastF2X; case T_DOUBLE: return Op_VectorCastD2X; ! default: ! assert(false, "unknown type: %s", type2name(bt)); return 0; + } } Node* ReductionNode::make_reduction_input(PhaseGVN& gvn, int opc, BasicType bt) { int vopc = opcode(opc, bt); guarantee(vopc != opc, "Vector reduction for '%s' is not implemented", NodeClassNames[opc]);
*** 1079,1088 **** --- 1040,1059 ---- return vopc != opc && Matcher::match_rule_supported(vopc); } return false; } + MacroLogicVNode* MacroLogicVNode::make(PhaseGVN& gvn, Node* in1, Node* in2, Node* in3, + uint truth_table, const TypeVect* vt) { + assert(truth_table <= 0xFF, "invalid"); + assert(in1->bottom_type()->is_vect()->length_in_bytes() == vt->length_in_bytes(), "mismatch"); + assert(in2->bottom_type()->is_vect()->length_in_bytes() == vt->length_in_bytes(), "mismatch"); + assert(in3->bottom_type()->is_vect()->length_in_bytes() == vt->length_in_bytes(), "mismatch"); + Node* fn = gvn.intcon(truth_table); + return new MacroLogicVNode(in1, in2, in3, fn, vt); + } + #ifndef PRODUCT void VectorMaskCmpNode::dump_spec(outputStream *st) const { st->print(" %d #", _predicate); _type->dump_on(st); } #endif // PRODUCT
*** 1127,1142 **** #ifndef PRODUCT void VectorBoxAllocateNode::dump_spec(outputStream *st) const { CallStaticJavaNode::dump_spec(st); } #endif // !PRODUCT - - MacroLogicVNode* MacroLogicVNode::make(PhaseGVN& gvn, Node* in1, Node* in2, Node* in3, - uint truth_table, const TypeVect* vt) { - assert(truth_table <= 0xFF, "invalid"); - assert(in1->bottom_type()->is_vect()->length_in_bytes() == vt->length_in_bytes(), "mismatch"); - assert(in2->bottom_type()->is_vect()->length_in_bytes() == vt->length_in_bytes(), "mismatch"); - assert(in3->bottom_type()->is_vect()->length_in_bytes() == vt->length_in_bytes(), "mismatch"); - Node* fn = gvn.intcon(truth_table); - return new MacroLogicVNode(in1, in2, in3, fn, vt); - } - --- 1098,1102 ----
< prev index next >