801 case Op_MulReductionVI: return new MulReductionVINode(ctrl, n1, n2);
802 case Op_MulReductionVL: return new MulReductionVLNode(ctrl, n1, n2);
803 case Op_MulReductionVF: return new MulReductionVFNode(ctrl, n1, n2);
804 case Op_MulReductionVD: return new MulReductionVDNode(ctrl, n1, n2);
805 case Op_MinReductionV: return new MinReductionVNode(ctrl, n1, n2);
806 case Op_MaxReductionV: return new MaxReductionVNode(ctrl, n1, n2);
807 case Op_AndReductionV: return new AndReductionVNode(ctrl, n1, n2);
808 case Op_OrReductionV: return new OrReductionVNode(ctrl, n1, n2);
809 case Op_XorReductionV: return new XorReductionVNode(ctrl, n1, n2);
810 default:
811 fatal("Missed vector creation for '%s'", NodeClassNames[vopc]);
812 return NULL;
813 }
814 }
815
816 bool ReductionNode::implemented(int opc, uint vlen, BasicType bt) {
817 if (is_java_primitive(bt) &&
818 (vlen > 1) && is_power_of_2(vlen) &&
819 Matcher::vector_size_supported(bt, vlen)) {
820 int vopc = ReductionNode::opcode(opc, bt);
821 return vopc != opc && Matcher::match_rule_supported(vopc);
822 }
823 return false;
824 }
825
826 MacroLogicVNode* MacroLogicVNode::make(PhaseGVN& gvn, Node* in1, Node* in2, Node* in3,
827 uint truth_table, const TypeVect* vt) {
828 assert(truth_table <= 0xFF, "invalid");
829 assert(in1->bottom_type()->is_vect()->length_in_bytes() == vt->length_in_bytes(), "mismatch");
830 assert(in2->bottom_type()->is_vect()->length_in_bytes() == vt->length_in_bytes(), "mismatch");
831 assert(in3->bottom_type()->is_vect()->length_in_bytes() == vt->length_in_bytes(), "mismatch");
832 Node* fn = gvn.intcon(truth_table);
833 return new MacroLogicVNode(in1, in2, in3, fn, vt);
834 }
835
836 Node* VectorNode::degenerate_vector_rotate(Node* src, Node* cnt, bool is_rotate_left,
837 int vlen, BasicType bt, PhaseGVN* phase) {
838 int shiftLOpc;
839 int shiftROpc;
840 Node* shiftLCnt = NULL;
841 Node* shiftRCnt = NULL;
|
801 case Op_MulReductionVI: return new MulReductionVINode(ctrl, n1, n2);
802 case Op_MulReductionVL: return new MulReductionVLNode(ctrl, n1, n2);
803 case Op_MulReductionVF: return new MulReductionVFNode(ctrl, n1, n2);
804 case Op_MulReductionVD: return new MulReductionVDNode(ctrl, n1, n2);
805 case Op_MinReductionV: return new MinReductionVNode(ctrl, n1, n2);
806 case Op_MaxReductionV: return new MaxReductionVNode(ctrl, n1, n2);
807 case Op_AndReductionV: return new AndReductionVNode(ctrl, n1, n2);
808 case Op_OrReductionV: return new OrReductionVNode(ctrl, n1, n2);
809 case Op_XorReductionV: return new XorReductionVNode(ctrl, n1, n2);
810 default:
811 fatal("Missed vector creation for '%s'", NodeClassNames[vopc]);
812 return NULL;
813 }
814 }
815
816 bool ReductionNode::implemented(int opc, uint vlen, BasicType bt) {
817 if (is_java_primitive(bt) &&
818 (vlen > 1) && is_power_of_2(vlen) &&
819 Matcher::vector_size_supported(bt, vlen)) {
820 int vopc = ReductionNode::opcode(opc, bt);
821 return vopc != opc && Matcher::match_rule_supported_vector(vopc, vlen, bt);
822 }
823 return false;
824 }
825
826 MacroLogicVNode* MacroLogicVNode::make(PhaseGVN& gvn, Node* in1, Node* in2, Node* in3,
827 uint truth_table, const TypeVect* vt) {
828 assert(truth_table <= 0xFF, "invalid");
829 assert(in1->bottom_type()->is_vect()->length_in_bytes() == vt->length_in_bytes(), "mismatch");
830 assert(in2->bottom_type()->is_vect()->length_in_bytes() == vt->length_in_bytes(), "mismatch");
831 assert(in3->bottom_type()->is_vect()->length_in_bytes() == vt->length_in_bytes(), "mismatch");
832 Node* fn = gvn.intcon(truth_table);
833 return new MacroLogicVNode(in1, in2, in3, fn, vt);
834 }
835
836 Node* VectorNode::degenerate_vector_rotate(Node* src, Node* cnt, bool is_rotate_left,
837 int vlen, BasicType bt, PhaseGVN* phase) {
838 int shiftLOpc;
839 int shiftROpc;
840 Node* shiftLCnt = NULL;
841 Node* shiftRCnt = NULL;
|