diff --git a/src/hotspot/share/opto/vectornode.cpp b/src/hotspot/share/opto/vectornode.cpp index 7592139f2d3..1a7954f6616 100644 --- a/src/hotspot/share/opto/vectornode.cpp +++ b/src/hotspot/share/opto/vectornode.cpp @@ -1051,7 +1051,7 @@ Node* VectorNode::Ideal(PhaseGVN* phase, bool can_reshape) { // // Due to the unique nature of vector masks, for specific IR patterns, // VectorMaskCast does not affect the output results. For example: -// (VectorStoreMask (VectorMaskCast ... (VectorLoadMask x))) => (x) +// (VectorStoreMask (VectorMaskCast* (VectorLoadMask x))) => (x) // x remains to be a bool vector with no changes. // This function can be used to eliminate the VectorMaskCast in such patterns. Node* VectorNode::uncast_mask(Node* n) { @@ -1486,7 +1486,7 @@ Node* VectorLoadMaskNode::Identity(PhaseGVN* phase) { Node* VectorStoreMaskNode::Identity(PhaseGVN* phase) { // Identity transformation on boolean vectors. - // VectorStoreMask (VectorMaskCast ... VectorLoadMask bv) elem_size ==> bv + // VectorStoreMask (VectorMaskCast* VectorLoadMask bv) elem_size ==> bv // vector[n]{bool} => vector[n]{t} => vector[n]{bool} Node* in1 = VectorNode::uncast_mask(in(1)); if (in1->Opcode() == Op_VectorLoadMask && length() == in1->as_Vector()->length()) { @@ -1920,7 +1920,7 @@ Node* VectorMaskOpNode::Ideal(PhaseGVN* phase, bool can_reshape) { } Node* VectorMaskCastNode::Identity(PhaseGVN* phase) { - // (VectorMaskCast (VectorMaskCast ... x)) => (x) + // (VectorMaskCast+ x) => (x) // If the types of the input and output nodes in a VectorMaskCast chain are // exactly the same, the intermediate VectorMaskCast nodes can be eliminated. Node* n = VectorNode::uncast_mask(this); diff --git a/test/hotspot/jtreg/compiler/vectorapi/VectorMaskCastIdentityTest.java b/test/hotspot/jtreg/compiler/vectorapi/VectorMaskCastIdentityTest.java index 4bcd0bf1c1a..c6ff2f31d9f 100644 --- a/test/hotspot/jtreg/compiler/vectorapi/VectorMaskCastIdentityTest.java +++ b/test/hotspot/jtreg/compiler/vectorapi/VectorMaskCastIdentityTest.java @@ -60,7 +60,7 @@ public class VectorMaskCastIdentityTest { VectorMask mInt128 = VectorMask.fromArray(IntVector.SPECIES_128, mr, 0); mInt128 = mInt128.cast(IntVector.SPECIES_128); // Insert a not() to prevent the casts being optimized by the optimization: - // (VectorStoreMask (VectorMaskCast ... (VectorLoadMask x))) => x + // (VectorStoreMask (VectorMaskCast* (VectorLoadMask x))) => x return mInt128.not().trueCount(); } diff --git a/test/hotspot/jtreg/compiler/vectorapi/VectorMaskToLongTest.java b/test/hotspot/jtreg/compiler/vectorapi/VectorMaskToLongTest.java index 2860d0971bb..b638bdaab91 100644 --- a/test/hotspot/jtreg/compiler/vectorapi/VectorMaskToLongTest.java +++ b/test/hotspot/jtreg/compiler/vectorapi/VectorMaskToLongTest.java @@ -239,7 +239,7 @@ public class VectorMaskToLongTest { // Test VectorMask.fromLong().toLong() with Float species. // For floating-point types, VectorMaskCast is inserted between fromLong and toLong to convert // between float and integer types. There are two relevant optimizations: - // 1. (VectorStoreMask (VectorMaskCast ... (VectorLoadMask x))) => (x) + // 1. (VectorStoreMask (VectorMaskCast* (VectorLoadMask x))) => (x) // 2. (VectorMaskToLong (VectorLongToMask x)) => (x) // The optimization behavior varies by architecture: // - SVE with bitperm: IR chain is (VectorMaskToLong (VectorStoreMask (VectorMaskCast