8214751: X86: Support for VNNI Instructions

Co-authored-by: Razvan A Lupusoru <razvan.a.lupusoru@intel.com>
Reviewed-by: kvn
This commit is contained in:
Vivek Deshpande 2018-12-12 14:48:34 -08:00
parent 40d7e4c2e9
commit 05e175bf1b
18 changed files with 491 additions and 4 deletions

View file

@ -196,6 +196,8 @@ int VectorNode::opcode(int sopc, BasicType bt) {
case Op_StoreF:
case Op_StoreD:
return Op_StoreVector;
case Op_MulAddS2I:
return Op_MulAddVS2VI;
default:
return 0; // Unimplemented
@ -214,6 +216,25 @@ bool VectorNode::implemented(int opc, uint vlen, BasicType bt) {
return false;
}
bool VectorNode::is_type_transition_short_to_int(Node* n) {
switch (n->Opcode()) {
case Op_MulAddS2I:
return true;
}
return false;
}
bool VectorNode::is_type_transition_to_int(Node* n) {
return is_type_transition_short_to_int(n);
}
bool VectorNode::is_muladds2i(Node* n) {
if (n->Opcode() == Op_MulAddS2I) {
return true;
}
return false;
}
bool VectorNode::is_shift(Node* n) {
switch (n->Opcode()) {
case Op_LShiftI:
@ -277,6 +298,7 @@ void VectorNode::vector_operands(Node* n, uint* start, uint* end) {
case Op_AndI: case Op_AndL:
case Op_OrI: case Op_OrL:
case Op_XorI: case Op_XorL:
case Op_MulAddS2I:
*start = 1;
*end = 3; // 2 vector operands
break;
@ -354,6 +376,8 @@ VectorNode* VectorNode::make(int opc, Node* n1, Node* n2, uint vlen, BasicType b
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_MulAddVS2VI: return new MulAddVS2VINode(n1, n2, vt);
default:
fatal("Missed vector creation for '%s'", NodeClassNames[vopc]);
return NULL;