From dcd64ad19bc65d2abcda549e394b9771feec5dfc Mon Sep 17 00:00:00 2001 From: erfang Date: Wed, 25 Feb 2026 02:28:34 +0000 Subject: [PATCH] Improve the code comment and tests --- .../jtreg/compiler/vectorapi/VectorMaskCastIdentityTest.java | 5 +++-- .../compiler/vectorapi/VectorStoreMaskIdentityTest.java | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/test/hotspot/jtreg/compiler/vectorapi/VectorMaskCastIdentityTest.java b/test/hotspot/jtreg/compiler/vectorapi/VectorMaskCastIdentityTest.java index b711b45385a..c7e96d6c536 100644 --- a/test/hotspot/jtreg/compiler/vectorapi/VectorMaskCastIdentityTest.java +++ b/test/hotspot/jtreg/compiler/vectorapi/VectorMaskCastIdentityTest.java @@ -118,8 +118,9 @@ public class VectorMaskCastIdentityTest { applyIfCPUFeatureOr = { "asimd", "true", "avx2", "true" }, applyIf = { "MaxVectorSize", ">= 16" }) public static int testTwoCastToDifferentType() { - // The types before and after the cast sequence are different, - // so the casts will not be eliminated. + // The types before and after the cast sequence are different, so the + // casts are not eliminated. We should probably be able to eliminate + // the intermediate cast, so that we only need a cast from short to int. VectorMask mShort64 = VectorMask.fromArray(ShortVector.SPECIES_64, mr, 0); VectorMask mFloat128 = mShort64.cast(FloatVector.SPECIES_128); VectorMask mInt128 = mFloat128.cast(IntVector.SPECIES_128); diff --git a/test/hotspot/jtreg/compiler/vectorapi/VectorStoreMaskIdentityTest.java b/test/hotspot/jtreg/compiler/vectorapi/VectorStoreMaskIdentityTest.java index 57026a56ab1..2d667d12e3f 100644 --- a/test/hotspot/jtreg/compiler/vectorapi/VectorStoreMaskIdentityTest.java +++ b/test/hotspot/jtreg/compiler/vectorapi/VectorStoreMaskIdentityTest.java @@ -28,7 +28,7 @@ * @summary VectorStoreMaskNode Identity optimization tests * @modules jdk.incubator.vector * -* @run driver compiler.vectorapi.VectorStoreMaskIdentityTest +* @run driver ${test.main.class} */ package compiler.vectorapi;