8257483: C2: Split immediate vector rotate from RotateLeftV and RotateRightV nodes

Reviewed-by: vlivanov
This commit is contained in:
Dong Bo 2020-12-10 12:26:04 +00:00 committed by Fei Yang
parent 0a0691ebcf
commit 026b09cf64
7 changed files with 27 additions and 2 deletions

View file

@ -1172,7 +1172,8 @@ Node* VectorNode::degenerate_vector_rotate(Node* src, Node* cnt, bool is_rotate_
Node* RotateLeftVNode::Ideal(PhaseGVN* phase, bool can_reshape) {
int vlen = length();
BasicType bt = vect_type()->element_basic_type();
if (!Matcher::match_rule_supported_vector(Op_RotateLeftV, vlen, bt)) {
if ((!in(2)->is_Con() && !Matcher::supports_vector_variable_rotates()) ||
!Matcher::match_rule_supported_vector(Op_RotateLeftV, vlen, bt)) {
return VectorNode::degenerate_vector_rotate(in(1), in(2), true, vlen, bt, phase);
}
return NULL;
@ -1181,7 +1182,8 @@ Node* RotateLeftVNode::Ideal(PhaseGVN* phase, bool can_reshape) {
Node* RotateRightVNode::Ideal(PhaseGVN* phase, bool can_reshape) {
int vlen = length();
BasicType bt = vect_type()->element_basic_type();
if (!Matcher::match_rule_supported_vector(Op_RotateRightV, vlen, bt)) {
if ((!in(2)->is_Con() && !Matcher::supports_vector_variable_rotates()) ||
!Matcher::match_rule_supported_vector(Op_RotateRightV, vlen, bt)) {
return VectorNode::degenerate_vector_rotate(in(1), in(2), false, vlen, bt, phase);
}
return NULL;