diff --git a/src/tests/JIT/opt/RangeChecks/ElidedBoundsChecks.cs b/src/tests/JIT/opt/RangeChecks/ElidedBoundsChecks.cs index 23d32a2f7304cb..1674adfff96da8 100644 --- a/src/tests/JIT/opt/RangeChecks/ElidedBoundsChecks.cs +++ b/src/tests/JIT/opt/RangeChecks/ElidedBoundsChecks.cs @@ -205,20 +205,6 @@ static int TwoArrays(int[] a, int[] b) return a[0] + b[0] + a[3] + b[1]; } - [MethodImpl(MethodImplOptions.NoInlining)] - static float SimdLoadBetweenBCs(float[] a) - { - // The contiguous Vector128.Create from a[1..4] is lowered to a single - // SIMD load whose bounds check throws ArgumentOutOfRangeException, not - // IndexOutOfRangeException. It must act as a barrier: if a[0]'s check - // were strengthened to a[7] across it, a too-short array would observe - // IndexOutOfRangeException instead of the ArgumentOutOfRangeException - // the SIMD load is required to throw first. - float x = a[0]; - Vector128 v = Vector128.Create(a[1], a[2], a[3], a[4]); - return x + v.ToScalar() + a[7]; - } - [MethodImpl(MethodImplOptions.NoInlining)] static int UnsignedShiftBySignBit(int i) { @@ -350,20 +336,6 @@ public static int TestEntryPoint() if (UnsignedShiftBySignBit(-1) != 1 || UnsignedShiftBySignBit(0) != 0) return 0; - // A SIMD load with a non-IOOB bounds check (ArgumentOutOfRangeException) - // between two array checks must act as a barrier: a[0]'s check must not - // be strengthened across it, otherwise a short array would observe - // IndexOutOfRangeException instead of ArgumentOutOfRangeException. - // The contiguous Vector128.Create -> single SIMD load recognition and the - // bounds-check coalescing being validated here are RyuJIT-specific, so - // only assert the exact exception type on CoreCLR. - if (!TestLibrary.Utilities.IsMonoRuntime && Vector128.IsHardwareAccelerated) - { - if (SimdLoadBetweenBCs(new float[8]) != 0f) - return 0; - Assert.Throws(() => SimdLoadBetweenBCs(new float[1])); - } - return 100; } }