src/share/vm/opto/superword.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File 6340864 Cdiff src/share/vm/opto/superword.cpp

src/share/vm/opto/superword.cpp

Print this page

        

*** 1398,1407 **** --- 1398,1419 ---- if (same_opd) { if (opd->is_Vector() || opd->is_LoadVector()) { return opd; // input is matching vector } + if (!VectorNode::needs_vector_input(p0, opd_idx)) { + // no vector is needed (shifts count) + if (!opd->is_Con()) { + assert(opd->bottom_type()->isa_int(), "int type only"); + // Move int value to xmm register + Node* in = new (_phase->C, 2) MoveI2FNode(opd); + _phase->_igvn.register_new_node_with_optimizer(in); + _phase->set_ctrl(in, _phase->get_ctrl(opd)); + opd = in; + } + return opd; + } assert(!opd->is_StoreVector(), "such vector is not expected here"); // Convert scalar input to vector with the same number of elements as // p0's vector. Use p0's type because size of operand's container in // vector should match p0's size regardless operand's size. const Type* p0_t = velt_type(p0);
*** 1716,1745 **** // Propagate narrowed type backwards through operations // that don't depend on higher order bits for (int i = _block.length() - 1; i >= 0; i--) { Node* n = _block.at(i); // Only integer types need be examined ! if (n->bottom_type()->isa_int()) { uint start, end; vector_opd_range(n, &start, &end); const Type* vt = velt_type(n); for (uint j = start; j < end; j++) { Node* in = n->in(j); // Don't propagate through a type conversion ! if (n->bottom_type() != in->bottom_type()) ! continue; ! switch(in->Opcode()) { ! case Op_AddI: case Op_AddL: ! case Op_SubI: case Op_SubL: ! case Op_MulI: case Op_MulL: ! case Op_AndI: case Op_AndL: ! case Op_OrI: case Op_OrL: ! case Op_XorI: case Op_XorL: ! case Op_LShiftI: case Op_LShiftL: ! case Op_CMoveI: case Op_CMoveL: ! if (in_bb(in)) { bool same_type = true; for (DUIterator_Fast kmax, k = in->fast_outs(kmax); k < kmax; k++) { Node *use = in->fast_out(k); if (!in_bb(use) || !same_velt_type(use, n)) { same_type = false; --- 1728,1747 ---- // Propagate narrowed type backwards through operations // that don't depend on higher order bits for (int i = _block.length() - 1; i >= 0; i--) { Node* n = _block.at(i); // Only integer types need be examined ! const Type* vt = velt_type(n); ! if (vt->basic_type() == T_INT) { uint start, end; vector_opd_range(n, &start, &end); const Type* vt = velt_type(n); for (uint j = start; j < end; j++) { Node* in = n->in(j); // Don't propagate through a type conversion ! if (in_bb(in) && velt_type(in)->basic_type() == T_INT) { bool same_type = true; for (DUIterator_Fast kmax, k = in->fast_outs(kmax); k < kmax; k++) { Node *use = in->fast_out(k); if (!in_bb(use) || !same_velt_type(use, n)) { same_type = false;
*** 1748,1758 **** } if (same_type) { set_velt_type(in, vt); } } - } } } } #ifndef PRODUCT if (TraceSuperWord && Verbose) { --- 1750,1759 ----
src/share/vm/opto/superword.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File