-
Notifications
You must be signed in to change notification settings - Fork 6.1k
8338023: Support two vector selectFrom API #20508
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 2 commits
45bfe6c
82c0b0a
055fb22
e24632c
d7ad688
6cb1a46
408a869
8d71f17
d3ee310
1c00f41
7c80bfc
d72c82e
2953004
31a5864
42ca80c
7327736
130fa3e
6215ab9
1cca8e2
79ee29c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2113,10 +2113,9 @@ Node* SelectFromTwoVectorNode::Ideal(PhaseGVN* phase, bool can_reshape) { | |
|
|
||
| const TypeVect* index_vect_type = index_vec->bottom_type()->is_vect(); | ||
| BasicType index_elem_bt = index_vect_type->element_basic_type(); | ||
| assert(!is_floating_point_type(index_elem_bt), ""); | ||
|
|
||
| // Downcast index vector to a type agnostic shuffle representation, shuffle indices | ||
| // are held in a byte vector which are later massaged to target specific permutation | ||
| // are held in a byte vector which are later transformed to target specific permutation | ||
| // index format by subsequent VectorLoadShuffle. | ||
| int cast_vopc = VectorCastNode::opcode(0, index_elem_bt, true); | ||
| Node* index_byte_vec = phase->transform(VectorCastNode::make(cast_vopc, index_vec, T_BYTE, num_elem)); | ||
|
||
|
|
@@ -2127,14 +2126,14 @@ Node* SelectFromTwoVectorNode::Ideal(PhaseGVN* phase, bool can_reshape) { | |
| // Compute the blend mask for merging two indipendently permututed vectors | ||
jatin-bhateja marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| // using shuff index in two vector index range [0, VLEN * 2). | ||
| BoolTest::mask pred = BoolTest::le; | ||
| ConINode* pred_node = (ConINode*)phase->makecon(TypeInt::make(pred)); | ||
| ConINode* pred_node = phase->makecon(TypeInt::make(pred))->as_ConI(); | ||
| const TypeVect* vmask_type = TypeVect::makemask(T_BYTE, num_elem); | ||
| Node* mask = phase->transform(new VectorMaskCmpNode(pred, index_byte_vec, bcast_lane_cnt_m1_vec, pred_node, vmask_type)); | ||
|
|
||
| // Rearrange expects the indexes to lie within single vector index range [0, VLEN). | ||
| index_byte_vec = phase->transform(VectorNode::make(Op_AndV, index_byte_vec, bcast_lane_cnt_m1_vec, index_byte_vec->bottom_type()->is_vect())); | ||
|
|
||
| // Load indexes from byte vector and appropriatly massage them to target specific | ||
| // Load indexes from byte vector and appropriatly transform them to target specific | ||
| // permutation index format. | ||
| index_vec = phase->transform(new VectorLoadShuffleNode(index_byte_vec, index_vect_type)); | ||
|
|
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.