From 58d0916d58449129e3d151567b8f3b21e7c026bb Mon Sep 17 00:00:00 2001 From: Tanner Gooding Date: Fri, 17 Jul 2026 07:38:33 -0700 Subject: [PATCH] Update outerloop convert tests for saturating float/double casts The saturating float/double -> small integral cast changes from #128604 were not reflected in JIT/IL_Conformance/Convert/TestConvertFromIntegral and JIT/Regression/CLR-x86-JIT/V1-M10/b05617, breaking outerloop. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- .../JIT/IL_Conformance/Convert/TestConvertFromIntegral.cs | 4 ++-- src/tests/JIT/Regression/CLR-x86-JIT/V1-M10/b05617/b05617.il | 2 +- .../JIT/Regression/CLR-x86-JIT/V1-M10/b05617/b05617.ilproj | 2 ++ 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/tests/JIT/IL_Conformance/Convert/TestConvertFromIntegral.cs b/src/tests/JIT/IL_Conformance/Convert/TestConvertFromIntegral.cs index a2f58ff0c6d452..9fd5cbfd9a5d07 100644 --- a/src/tests/JIT/IL_Conformance/Convert/TestConvertFromIntegral.cs +++ b/src/tests/JIT/IL_Conformance/Convert/TestConvertFromIntegral.cs @@ -702,7 +702,7 @@ static void TestConvertFromFloatToI2() GenerateTest(-1F, sourceOp, convNoOvf, DontExpectException, -1); GenerateTest(short.MaxValue, sourceOp, convNoOvf, DontExpectException, short.MaxValue); GenerateTest(short.MinValue, sourceOp, convNoOvf, DontExpectException, short.MinValue); - GenerateTest(ushort.MaxValue, sourceOp, convNoOvf, DontExpectException, -1); + GenerateTest(ushort.MaxValue, sourceOp, convNoOvf, DontExpectException, 0, UnspecifiedBehaviour); // Saturates to short.MaxValue on CoreCLR, truncates on Mono (https://github.com/dotnet/runtime/issues/100368) GenerateTest(ushort.MinValue, sourceOp, convNoOvf, DontExpectException, byte.MinValue); GenerateTest(long.MaxValue, sourceOp, convNoOvf, DontExpectException, 0, UnspecifiedBehaviour); GenerateTest(long.MinValue, sourceOp, convNoOvf, DontExpectException, 0, UnspecifiedBehaviour); @@ -977,7 +977,7 @@ static void TestConvertFromDoubleToI2() GenerateTest(-1, sourceOp, convNoOvf, DontExpectException, -1); GenerateTest(short.MaxValue, sourceOp, convNoOvf, DontExpectException, short.MaxValue); GenerateTest(short.MinValue, sourceOp, convNoOvf, DontExpectException, short.MinValue); - GenerateTest(ushort.MaxValue, sourceOp, convNoOvf, DontExpectException, -1); + GenerateTest(ushort.MaxValue, sourceOp, convNoOvf, DontExpectException, 0, UnspecifiedBehaviour); // Saturates to short.MaxValue on CoreCLR, truncates on Mono (https://github.com/dotnet/runtime/issues/100368) GenerateTest(ushort.MinValue, sourceOp, convNoOvf, DontExpectException, byte.MinValue); GenerateTest(long.MaxValue, sourceOp, convNoOvf, DontExpectException, 0, UnspecifiedBehaviour); GenerateTest(long.MinValue, sourceOp, convNoOvf, DontExpectException, 0, UnspecifiedBehaviour); diff --git a/src/tests/JIT/Regression/CLR-x86-JIT/V1-M10/b05617/b05617.il b/src/tests/JIT/Regression/CLR-x86-JIT/V1-M10/b05617/b05617.il index 193d3a90db79ad..8a4d3333ce6cf2 100644 --- a/src/tests/JIT/Regression/CLR-x86-JIT/V1-M10/b05617/b05617.il +++ b/src/tests/JIT/Regression/CLR-x86-JIT/V1-M10/b05617/b05617.il @@ -40,7 +40,7 @@ stloc.0 sub sub or -ldc.i8 4294967086 +ldc.i8 4294967043 conv.u4 sub diff --git a/src/tests/JIT/Regression/CLR-x86-JIT/V1-M10/b05617/b05617.ilproj b/src/tests/JIT/Regression/CLR-x86-JIT/V1-M10/b05617/b05617.ilproj index 7c7ed9f1abff72..8001c67d8a8727 100644 --- a/src/tests/JIT/Regression/CLR-x86-JIT/V1-M10/b05617/b05617.ilproj +++ b/src/tests/JIT/Regression/CLR-x86-JIT/V1-M10/b05617/b05617.ilproj @@ -1,6 +1,8 @@ 1 + + true PdbOnly