Improve the code comment and tests

This commit is contained in:
erfang 2026-02-25 02:28:34 +00:00
parent c6eec0553d
commit dcd64ad19b
2 changed files with 4 additions and 3 deletions

View File

@ -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<Short> mShort64 = VectorMask.fromArray(ShortVector.SPECIES_64, mr, 0);
VectorMask<Float> mFloat128 = mShort64.cast(FloatVector.SPECIES_128);
VectorMask<Integer> mInt128 = mFloat128.cast(IntVector.SPECIES_128);

View File

@ -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;