mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-17 17:44:40 +02:00
8257483: C2: Split immediate vector rotate from RotateLeftV and RotateRightV nodes
Reviewed-by: vlivanov
This commit is contained in:
parent
0a0691ebcf
commit
026b09cf64
7 changed files with 27 additions and 2 deletions
|
@ -2437,6 +2437,10 @@ bool Matcher::supports_vector_variable_shifts(void) {
|
|||
return true;
|
||||
}
|
||||
|
||||
bool Matcher::supports_vector_variable_rotates(void) {
|
||||
return false; // not supported
|
||||
}
|
||||
|
||||
const int Matcher::float_pressure(int default_pressure_threshold) {
|
||||
return default_pressure_threshold;
|
||||
}
|
||||
|
|
|
@ -997,6 +997,10 @@ bool Matcher::supports_vector_variable_shifts(void) {
|
|||
return VM_Version::has_simd();
|
||||
}
|
||||
|
||||
bool Matcher::supports_vector_variable_rotates(void) {
|
||||
return false; // not supported
|
||||
}
|
||||
|
||||
const int Matcher::float_pressure(int default_pressure_threshold) {
|
||||
return default_pressure_threshold;
|
||||
}
|
||||
|
|
|
@ -2155,6 +2155,10 @@ bool Matcher::supports_vector_variable_shifts(void) {
|
|||
return false; // not supported
|
||||
}
|
||||
|
||||
bool Matcher::supports_vector_variable_rotates(void) {
|
||||
return false; // not supported
|
||||
}
|
||||
|
||||
const int Matcher::float_pressure(int default_pressure_threshold) {
|
||||
return default_pressure_threshold;
|
||||
}
|
||||
|
|
|
@ -1550,6 +1550,10 @@ bool Matcher::supports_vector_variable_shifts(void) {
|
|||
return false; // not supported
|
||||
}
|
||||
|
||||
bool Matcher::supports_vector_variable_rotates(void) {
|
||||
return false; // not supported
|
||||
}
|
||||
|
||||
const int Matcher::float_pressure(int default_pressure_threshold) {
|
||||
return default_pressure_threshold;
|
||||
}
|
||||
|
|
|
@ -1814,6 +1814,10 @@ bool Matcher::supports_vector_variable_shifts(void) {
|
|||
return (UseAVX >= 2);
|
||||
}
|
||||
|
||||
bool Matcher::supports_vector_variable_rotates(void) {
|
||||
return true;
|
||||
}
|
||||
|
||||
const bool Matcher::has_predicated_vectors(void) {
|
||||
bool ret_value = false;
|
||||
if (UseAVX > 2) {
|
||||
|
|
|
@ -348,6 +348,9 @@ public:
|
|||
// Does the CPU supports vector variable shift instructions?
|
||||
static bool supports_vector_variable_shifts(void);
|
||||
|
||||
// Does the CPU supports vector vairable rotate instructions?
|
||||
static bool supports_vector_variable_rotates(void);
|
||||
|
||||
// CPU supports misaligned vectors store/load.
|
||||
static const bool misaligned_vectors_ok();
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue