Review comments resolutions

This commit is contained in:
Jatin Bhateja 2026-01-23 06:26:11 +00:00
parent 2c7eb96d6c
commit ae2429262f
10 changed files with 11 additions and 19 deletions

View File

@ -1703,14 +1703,14 @@ bool LibraryCallKit::inline_vector_slice() {
return false; // should be primitive type
}
int num_elem = vlen->get_con();
BasicType elem_bt = elem_type->basic_type();
if (!origin->is_con()) {
log_if_needed(" ** vector slice from non-constant index not supported");
return false;
}
int num_elem = vlen->get_con();
BasicType elem_bt = elem_type->basic_type();
if (!arch_supports_vector(Op_VectorSlice, num_elem, elem_bt, VecMaskNotUsed)) {
log_if_needed(" ** not supported: arity=2 op=slice vlen=%d etype=%s",
num_elem, type2name(elem_bt));

View File

@ -2437,15 +2437,13 @@ Node* UMaxVNode::Identity(PhaseGVN* phase) {
}
Node* VectorSliceNode::Identity(PhaseGVN* phase) {
if (origin()->is_Con()) {
jint index = origin()->get_int();
uint vlen = vect_type()->length_in_bytes();
if (vlen == (uint)index) {
return vec2();
}
if (index == 0) {
return vec1();
}
jint index = origin()->get_int();
uint vlen = vect_type()->length_in_bytes();
if (vlen == (uint) index) {
return vec2();
}
if (index == 0) {
return vec1();
}
return this;
}

View File

@ -1696,6 +1696,7 @@ class VectorSliceNode : public VectorNode {
public:
VectorSliceNode(Node* vec1, Node* vec2, Node* origin, const TypeVect* vt)
: VectorNode(vec1, vec2, origin, vt) {
assert(origin->is_Con(), "origin must be a constant");
}
virtual int Opcode() const;

View File

@ -2304,7 +2304,6 @@ public abstract class ByteVector extends AbstractVector<Byte> {
public abstract
ByteVector slice(int origin, Vector<Byte> v1);
/*package-private*/
final
@ForceInline

View File

@ -2158,7 +2158,6 @@ public abstract class DoubleVector extends AbstractVector<Double> {
public abstract
DoubleVector slice(int origin, Vector<Double> v1);
/*package-private*/
final
@ForceInline

View File

@ -2170,7 +2170,6 @@ public abstract class FloatVector extends AbstractVector<Float> {
public abstract
FloatVector slice(int origin, Vector<Float> v1);
/*package-private*/
final
@ForceInline

View File

@ -2289,7 +2289,6 @@ public abstract class IntVector extends AbstractVector<Integer> {
public abstract
IntVector slice(int origin, Vector<Integer> v1);
/*package-private*/
final
@ForceInline

View File

@ -2155,7 +2155,6 @@ public abstract class LongVector extends AbstractVector<Long> {
public abstract
LongVector slice(int origin, Vector<Long> v1);
/*package-private*/
final
@ForceInline

View File

@ -2305,7 +2305,6 @@ public abstract class ShortVector extends AbstractVector<Short> {
public abstract
ShortVector slice(int origin, Vector<Short> v1);
/*package-private*/
final
@ForceInline

View File

@ -2717,7 +2717,6 @@ public abstract class $abstractvectortype$ extends AbstractVector<$Boxtype$> {
public abstract
$abstractvectortype$ slice(int origin, Vector<$Boxtype$> v1);
/*package-private*/
final
@ForceInline