2436 if (VectorNode::is_invariant_vector(in1) && (node_isa_reduction == false) && (n->is_Add() || n->is_Mul())) {
2437 // Move invariant vector input into second position to avoid register spilling.
2438 Node* tmp = in1;
2439 in1 = in2;
2440 in2 = tmp;
2441 }
2442 if (node_isa_reduction) {
2443 const Type *arith_type = n->bottom_type();
2444 vn = ReductionNode::make(opc, NULL, in1, in2, arith_type->basic_type());
2445 if (in2->is_Load()) {
2446 vlen_in_bytes = in2->as_LoadVector()->memory_size();
2447 } else {
2448 vlen_in_bytes = in2->as_Vector()->length_in_bytes();
2449 }
2450 } else {
2451 vn = VectorNode::make(opc, in1, in2, vlen, velt_basic_type(n));
2452 vlen_in_bytes = vn->as_Vector()->length_in_bytes();
2453 }
2454 } else if (opc == Op_SqrtF || opc == Op_SqrtD ||
2455 opc == Op_AbsF || opc == Op_AbsD ||
2456 opc == Op_NegF || opc == Op_NegD ||
2457 opc == Op_PopCountI) {
2458 assert(n->req() == 2, "only one input expected");
2459 Node* in = vector_opd(p, 1);
2460 vn = VectorNode::make(opc, in, NULL, vlen, velt_basic_type(n));
2461 vlen_in_bytes = vn->as_Vector()->length_in_bytes();
2462 } else if (is_cmov_pack(p)) {
2463 if (can_process_post_loop) {
2464 // do not refactor of flow in post loop context
2465 return;
2466 }
2467 if (!n->is_CMove()) {
2468 continue;
2469 }
2470 // place here CMoveVDNode
2471 NOT_PRODUCT(if(is_trace_cmov()) {tty->print_cr("SWPointer::output: print before CMove vectorization"); print_loop(false);})
2472 Node* bol = n->in(CMoveNode::Condition);
2473 if (!bol->is_Bool() && bol->Opcode() == Op_ExtractI && bol->req() > 1 ) {
2474 NOT_PRODUCT(if(is_trace_cmov()) {tty->print_cr("SWPointer::output: %d is not Bool node, trying its in(1) node %d", bol->_idx, bol->in(1)->_idx); bol->dump(); bol->in(1)->dump();})
2475 bol = bol->in(1); //may be ExtractNode
|
2436 if (VectorNode::is_invariant_vector(in1) && (node_isa_reduction == false) && (n->is_Add() || n->is_Mul())) {
2437 // Move invariant vector input into second position to avoid register spilling.
2438 Node* tmp = in1;
2439 in1 = in2;
2440 in2 = tmp;
2441 }
2442 if (node_isa_reduction) {
2443 const Type *arith_type = n->bottom_type();
2444 vn = ReductionNode::make(opc, NULL, in1, in2, arith_type->basic_type());
2445 if (in2->is_Load()) {
2446 vlen_in_bytes = in2->as_LoadVector()->memory_size();
2447 } else {
2448 vlen_in_bytes = in2->as_Vector()->length_in_bytes();
2449 }
2450 } else {
2451 vn = VectorNode::make(opc, in1, in2, vlen, velt_basic_type(n));
2452 vlen_in_bytes = vn->as_Vector()->length_in_bytes();
2453 }
2454 } else if (opc == Op_SqrtF || opc == Op_SqrtD ||
2455 opc == Op_AbsF || opc == Op_AbsD ||
2456 opc == Op_AbsI || opc == Op_AbsL ||
2457 opc == Op_NegF || opc == Op_NegD ||
2458 opc == Op_PopCountI) {
2459 assert(n->req() == 2, "only one input expected");
2460 Node* in = vector_opd(p, 1);
2461 vn = VectorNode::make(opc, in, NULL, vlen, velt_basic_type(n));
2462 vlen_in_bytes = vn->as_Vector()->length_in_bytes();
2463 } else if (is_cmov_pack(p)) {
2464 if (can_process_post_loop) {
2465 // do not refactor of flow in post loop context
2466 return;
2467 }
2468 if (!n->is_CMove()) {
2469 continue;
2470 }
2471 // place here CMoveVDNode
2472 NOT_PRODUCT(if(is_trace_cmov()) {tty->print_cr("SWPointer::output: print before CMove vectorization"); print_loop(false);})
2473 Node* bol = n->in(CMoveNode::Condition);
2474 if (!bol->is_Bool() && bol->Opcode() == Op_ExtractI && bol->req() > 1 ) {
2475 NOT_PRODUCT(if(is_trace_cmov()) {tty->print_cr("SWPointer::output: %d is not Bool node, trying its in(1) node %d", bol->_idx, bol->in(1)->_idx); bol->dump(); bol->in(1)->dump();})
2476 bol = bol->in(1); //may be ExtractNode
|