diff --git a/test/hotspot/jtreg/compiler/vectorapi/VectorMaskCastIdentityTest.java b/test/hotspot/jtreg/compiler/vectorapi/VectorMaskCastIdentityTest.java index 5e360d4305c..474aa80fd96 100644 --- a/test/hotspot/jtreg/compiler/vectorapi/VectorMaskCastIdentityTest.java +++ b/test/hotspot/jtreg/compiler/vectorapi/VectorMaskCastIdentityTest.java @@ -49,14 +49,13 @@ public class VectorMaskCastIdentityTest { } } - // The types before and after the cast sequence are the same, - // so the casts will be eliminated. - @Test @IR(counts = { IRNode.VECTOR_MASK_CAST, "= 0" }, applyIfCPUFeatureOr = { "asimd", "true", "avx2", "true" }, applyIf = { "MaxVectorSize", ">= 16" }) public static int testOneCastToSameType() { + // The types before and after the cast sequence are the same, + // so the casts will be eliminated. 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: @@ -76,6 +75,8 @@ public class VectorMaskCastIdentityTest { applyIfCPUFeatureOr = { "asimd", "true", "avx2", "true" }, applyIf = { "MaxVectorSize", ">= 16" }) public static int testTwoCastToSameType() { + // The types before and after the cast sequence are the same, + // so the casts will be eliminated. VectorMask mInt128 = VectorMask.fromArray(IntVector.SPECIES_128, mr, 0); VectorMask mFloat128 = mInt128.cast(FloatVector.SPECIES_128); VectorMask mInt128_2 = mFloat128.cast(IntVector.SPECIES_128); @@ -89,14 +90,13 @@ public class VectorMaskCastIdentityTest { Asserts.assertEquals(count, mInt128.not().trueCount()); } - // The types before and after the cast sequence are different, - // so the casts will not be eliminated. - @Test @IR(counts = { IRNode.VECTOR_MASK_CAST, "= 1" }, applyIfCPUFeatureOr = { "asimd", "true", "avx2", "true" }, applyIf = { "MaxVectorSize", ">= 16" }) public static int testOneCastToDifferentType() { + // The types before and after the cast sequence are different, + // so the casts will not be eliminated. VectorMask mInt128 = VectorMask.fromArray(IntVector.SPECIES_128, mr, 0); VectorMask mShort64 = mInt128.cast(ShortVector.SPECIES_64); return mShort64.not().trueCount(); @@ -114,6 +114,8 @@ 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. VectorMask mShort64 = VectorMask.fromArray(ShortVector.SPECIES_64, mr, 0); VectorMask mFloat128 = mShort64.cast(FloatVector.SPECIES_128); VectorMask mInt128 = mFloat128.cast(IntVector.SPECIES_128);