On Tue, 15 Sep 2026 05:48:45 GMT, Jatin Bhateja <[email protected]> wrote:
>> src/hotspot/share/opto/vectorIntrinsics.cpp line 1841: >> >>> 1839: Node* origin_node = gvn().intcon(origin->get_con() * >>> type2aelembytes(elem_bt)); >>> 1840: const TypeVect* vector_type = TypeVect::make(elem_bt, num_elem); >>> 1841: Node* operation = gvn().transform(trace_vector(new >>> VectorSliceNode(v1, v2, origin_node, vector_type))); >> >> For subword vectors of length > 16 with mid range byte origin (16 < byte >> origin < 48) there seems to be a regression. This is due to having three >> shuffle ops (valignd+valignd+valignr), we could instead rewrite this case >> with VectorLoadConst followed by SelectFromTwoVector where supported. The >> compiler would then hoist the VectorLoadConst above the loop and it would be >> just vpermi2b/w inside the loop. >> >> Node* iota = gvn().transform(new >> VectorLoadConstNode(gvn().makecon(TypeInt::ZERO), vector_type)); >> Node* bcast = >> gvn().transform(VectorNode::scalar2vector(gvn().intcon(origin->get_con()), >> num_elem, elem_bt)); >> Node* index = gvn().transform(VectorNode::make(add_vopc, iota, bcast, >> vector_type)); >> operation = gvn().transform(trace_vector(new SelectFromTwoVectorNode(index, >> v1, v2, vector_type))); > > Addressed Thanks. The jtreg test is failing due to IR rule failure. It also needs update corresponding to the SelectFromTwoVector change. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24104#discussion_r4018208181
