< prev index next >
src/share/vm/opto/vectornode.cpp
Print this page
rev 8979 : [mq]: vmerr_static
*** 250,260 ****
// Return the vector version of a scalar operation node.
VectorNode* VectorNode::make(int opc, Node* n1, Node* n2, uint vlen, BasicType bt) {
const TypeVect* vt = TypeVect::make(bt, vlen);
int vopc = VectorNode::opcode(opc, bt);
// This method should not be called for unimplemented vectors.
! guarantee(vopc > 0, err_msg_res("Vector for '%s' is not implemented", NodeClassNames[opc]));
switch (vopc) {
case Op_AddVB: return new AddVBNode(n1, n2, vt);
case Op_AddVS: return new AddVSNode(n1, n2, vt);
case Op_AddVI: return new AddVINode(n1, n2, vt);
case Op_AddVL: return new AddVLNode(n1, n2, vt);
--- 250,260 ----
// Return the vector version of a scalar operation node.
VectorNode* VectorNode::make(int opc, Node* n1, Node* n2, uint vlen, BasicType bt) {
const TypeVect* vt = TypeVect::make(bt, vlen);
int vopc = VectorNode::opcode(opc, bt);
// This method should not be called for unimplemented vectors.
! guarantee(vopc > 0, "Vector for '%s' is not implemented", NodeClassNames[opc]);
switch (vopc) {
case Op_AddVB: return new AddVBNode(n1, n2, vt);
case Op_AddVS: return new AddVSNode(n1, n2, vt);
case Op_AddVI: return new AddVINode(n1, n2, vt);
case Op_AddVL: return new AddVLNode(n1, n2, vt);
*** 294,304 ****
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);
}
! fatal(err_msg_res("Missed vector creation for '%s'", NodeClassNames[vopc]));
return NULL;
}
// Scalar promotion
--- 294,304 ----
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);
}
! fatal("Missed vector creation for '%s'", NodeClassNames[vopc]);
return NULL;
}
// Scalar promotion
*** 320,330 ****
case T_FLOAT:
return new ReplicateFNode(s, vt);
case T_DOUBLE:
return new ReplicateDNode(s, vt);
}
! fatal(err_msg_res("Type '%s' is not supported for vectors", type2name(bt)));
return NULL;
}
VectorNode* VectorNode::shift_count(Node* shift, Node* cnt, uint vlen, BasicType bt) {
assert(VectorNode::is_shift(shift) && !cnt->is_Con(), "only variable shift count");
--- 320,330 ----
case T_FLOAT:
return new ReplicateFNode(s, vt);
case T_DOUBLE:
return new ReplicateDNode(s, vt);
}
! fatal("Type '%s' is not supported for vectors", type2name(bt));
return NULL;
}
VectorNode* VectorNode::shift_count(Node* shift, Node* cnt, uint vlen, BasicType bt) {
assert(VectorNode::is_shift(shift) && !cnt->is_Con(), "only variable shift count");
*** 338,348 ****
case Op_RShiftL:
case Op_URShiftI:
case Op_URShiftL:
return new RShiftCntVNode(cnt, vt);
}
! fatal(err_msg_res("Missed vector creation for '%s'", NodeClassNames[shift->Opcode()]));
return NULL;
}
// Return initial Pack node. Additional operands added with add_opd() calls.
PackNode* PackNode::make(Node* s, uint vlen, BasicType bt) {
--- 338,348 ----
case Op_RShiftL:
case Op_URShiftI:
case Op_URShiftL:
return new RShiftCntVNode(cnt, vt);
}
! fatal("Missed vector creation for '%s'", NodeClassNames[shift->Opcode()]);
return NULL;
}
// Return initial Pack node. Additional operands added with add_opd() calls.
PackNode* PackNode::make(Node* s, uint vlen, BasicType bt) {
*** 361,371 ****
case T_FLOAT:
return new PackFNode(s, vt);
case T_DOUBLE:
return new PackDNode(s, vt);
}
! fatal(err_msg_res("Type '%s' is not supported for vectors", type2name(bt)));
return NULL;
}
// Create a binary tree form for Packs. [lo, hi) (half-open) range
PackNode* PackNode::binary_tree_pack(int lo, int hi) {
--- 361,371 ----
case T_FLOAT:
return new PackFNode(s, vt);
case T_DOUBLE:
return new PackDNode(s, vt);
}
! fatal("Type '%s' is not supported for vectors", type2name(bt));
return NULL;
}
// Create a binary tree form for Packs. [lo, hi) (half-open) range
PackNode* PackNode::binary_tree_pack(int lo, int hi) {
*** 397,407 ****
case T_FLOAT:
return new PackDNode(n1, n2, TypeVect::make(T_DOUBLE, 2));
case T_DOUBLE:
return new Pack2DNode(n1, n2, TypeVect::make(T_DOUBLE, 2));
}
! fatal(err_msg_res("Type '%s' is not supported for vectors", type2name(bt)));
}
return NULL;
}
// Return the vector version of a scalar load node.
--- 397,407 ----
case T_FLOAT:
return new PackDNode(n1, n2, TypeVect::make(T_DOUBLE, 2));
case T_DOUBLE:
return new Pack2DNode(n1, n2, TypeVect::make(T_DOUBLE, 2));
}
! fatal("Type '%s' is not supported for vectors", type2name(bt));
}
return NULL;
}
// Return the vector version of a scalar load node.
*** 440,450 ****
case T_FLOAT:
return new ExtractFNode(v, pos);
case T_DOUBLE:
return new ExtractDNode(v, pos);
}
! fatal(err_msg_res("Type '%s' is not supported for vectors", type2name(bt)));
return NULL;
}
int ReductionNode::opcode(int opc, BasicType bt) {
int vopc = opc;
--- 440,450 ----
case T_FLOAT:
return new ExtractFNode(v, pos);
case T_DOUBLE:
return new ExtractDNode(v, pos);
}
! fatal("Type '%s' is not supported for vectors", type2name(bt));
return NULL;
}
int ReductionNode::opcode(int opc, BasicType bt) {
int vopc = opc;
*** 492,502 ****
ReductionNode* ReductionNode::make(int opc, Node *ctrl, Node* n1, Node* n2, BasicType bt) {
int vopc = opcode(opc, bt);
// This method should not be called for unimplemented vectors.
! guarantee(vopc != opc, err_msg_res("Vector for '%s' is not implemented", NodeClassNames[opc]));
switch (vopc) {
case Op_AddReductionVI: return new AddReductionVINode(ctrl, n1, n2);
case Op_AddReductionVL: return new AddReductionVLNode(ctrl, n1, n2);
case Op_AddReductionVF: return new AddReductionVFNode(ctrl, n1, n2);
--- 492,502 ----
ReductionNode* ReductionNode::make(int opc, Node *ctrl, Node* n1, Node* n2, BasicType bt) {
int vopc = opcode(opc, bt);
// This method should not be called for unimplemented vectors.
! guarantee(vopc != opc, "Vector for '%s' is not implemented", NodeClassNames[opc]);
switch (vopc) {
case Op_AddReductionVI: return new AddReductionVINode(ctrl, n1, n2);
case Op_AddReductionVL: return new AddReductionVLNode(ctrl, n1, n2);
case Op_AddReductionVF: return new AddReductionVFNode(ctrl, n1, n2);
*** 504,514 ****
case Op_MulReductionVI: return new MulReductionVINode(ctrl, n1, n2);
case Op_MulReductionVL: return new MulReductionVLNode(ctrl, n1, n2);
case Op_MulReductionVF: return new MulReductionVFNode(ctrl, n1, n2);
case Op_MulReductionVD: return new MulReductionVDNode(ctrl, n1, n2);
}
! fatal(err_msg_res("Missed vector creation for '%s'", NodeClassNames[vopc]));
return NULL;
}
bool ReductionNode::implemented(int opc, uint vlen, BasicType bt) {
if (is_java_primitive(bt) &&
--- 504,514 ----
case Op_MulReductionVI: return new MulReductionVINode(ctrl, n1, n2);
case Op_MulReductionVL: return new MulReductionVLNode(ctrl, n1, n2);
case Op_MulReductionVF: return new MulReductionVFNode(ctrl, n1, n2);
case Op_MulReductionVD: return new MulReductionVDNode(ctrl, n1, n2);
}
! fatal("Missed vector creation for '%s'", NodeClassNames[vopc]);
return NULL;
}
bool ReductionNode::implemented(int opc, uint vlen, BasicType bt) {
if (is_java_primitive(bt) &&
< prev index next >