mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 07:14:30 +02:00
8335628: C2 SuperWord: cleanup: remove SuperWord::longer_type_for_conversion
Reviewed-by: chagedorn, kvn
This commit is contained in:
parent
d77e6fe45c
commit
73ddb7deab
2 changed files with 1 additions and 27 deletions
|
@ -691,9 +691,7 @@ bool SuperWord::can_pack_into_pair(Node* s1, Node* s2) {
|
||||||
BasicType bt2 = velt_basic_type(s2);
|
BasicType bt2 = velt_basic_type(s2);
|
||||||
if(!is_java_primitive(bt1) || !is_java_primitive(bt2))
|
if(!is_java_primitive(bt1) || !is_java_primitive(bt2))
|
||||||
return false;
|
return false;
|
||||||
BasicType longer_bt = longer_type_for_conversion(s1);
|
if (Matcher::max_vector_size_auto_vectorization(bt1) < 2) {
|
||||||
if (Matcher::max_vector_size_auto_vectorization(bt1) < 2 ||
|
|
||||||
(longer_bt != T_ILLEGAL && Matcher::max_vector_size_auto_vectorization(longer_bt) < 2)) {
|
|
||||||
return false; // No vectors for this type
|
return false; // No vectors for this type
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2442,27 +2440,6 @@ VStatus VLoopBody::construct() {
|
||||||
return VStatus::make_success();
|
return VStatus::make_success();
|
||||||
}
|
}
|
||||||
|
|
||||||
BasicType SuperWord::longer_type_for_conversion(Node* n) const {
|
|
||||||
if (!(VectorNode::is_convert_opcode(n->Opcode()) ||
|
|
||||||
VectorNode::is_scalar_op_that_returns_int_but_vector_op_returns_long(n->Opcode())) ||
|
|
||||||
!in_bb(n->in(1))) {
|
|
||||||
return T_ILLEGAL;
|
|
||||||
}
|
|
||||||
assert(in_bb(n), "must be in the bb");
|
|
||||||
BasicType src_t = velt_basic_type(n->in(1));
|
|
||||||
BasicType dst_t = velt_basic_type(n);
|
|
||||||
// Do not use superword for non-primitives.
|
|
||||||
// Superword does not support casting involving unsigned types.
|
|
||||||
if (!is_java_primitive(src_t) || is_unsigned_subword_type(src_t) ||
|
|
||||||
!is_java_primitive(dst_t) || is_unsigned_subword_type(dst_t)) {
|
|
||||||
return T_ILLEGAL;
|
|
||||||
}
|
|
||||||
int src_size = type2aelembytes(src_t);
|
|
||||||
int dst_size = type2aelembytes(dst_t);
|
|
||||||
return src_size == dst_size ? T_ILLEGAL
|
|
||||||
: (src_size > dst_size ? src_t : dst_t);
|
|
||||||
}
|
|
||||||
|
|
||||||
void VLoopTypes::compute_vector_element_type() {
|
void VLoopTypes::compute_vector_element_type() {
|
||||||
#ifndef PRODUCT
|
#ifndef PRODUCT
|
||||||
if (_vloop.is_trace_vector_element_type()) {
|
if (_vloop.is_trace_vector_element_type()) {
|
||||||
|
|
|
@ -623,9 +623,6 @@ private:
|
||||||
// Is use->in(u_idx) a vector use?
|
// Is use->in(u_idx) a vector use?
|
||||||
bool is_vector_use(Node* use, int u_idx) const;
|
bool is_vector_use(Node* use, int u_idx) const;
|
||||||
|
|
||||||
// Return the longer type for vectorizable type-conversion node or illegal type for other nodes.
|
|
||||||
BasicType longer_type_for_conversion(Node* n) const;
|
|
||||||
|
|
||||||
bool is_velt_basic_type_compatible_use_def(Node* use, Node* def) const;
|
bool is_velt_basic_type_compatible_use_def(Node* use, Node* def) const;
|
||||||
|
|
||||||
bool schedule_and_apply() const;
|
bool schedule_and_apply() const;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue