diff --git a/docs/design/coreclr/botr/readytorun-format.md b/docs/design/coreclr/botr/readytorun-format.md index a9a5c8b9163039..82cade6222ceab 100644 --- a/docs/design/coreclr/botr/readytorun-format.md +++ b/docs/design/coreclr/botr/readytorun-format.md @@ -814,7 +814,7 @@ enum ReadyToRunHelper READYTORUN_HELPER_GetString = 0x50, // Used by /Tuning for Profile optimizations - READYTORUN_HELPER_LogMethodEnter = 0x51, + READYTORUN_HELPER_LogMethodEnter = 0x51, // Unused since READYTORUN_MAJOR_VERSION 10.0 // Reflection helpers READYTORUN_HELPER_GetRuntimeTypeHandle = 0x54, @@ -870,12 +870,14 @@ enum ReadyToRunHelper READYTORUN_HELPER_Dbl2UIntOvf = 0xD5, READYTORUN_HELPER_Dbl2ULng = 0xD6, READYTORUN_HELPER_Dbl2ULngOvf = 0xD7, + READYTORUN_HELPER_Lng2Flt = 0xD8, + READYTORUN_HELPER_ULng2Flt = 0xD9, // Floating point ops READYTORUN_HELPER_DblRem = 0xE0, READYTORUN_HELPER_FltRem = 0xE1, - READYTORUN_HELPER_DblRound = 0xE2, - READYTORUN_HELPER_FltRound = 0xE3, + READYTORUN_HELPER_DblRound = 0xE2, // Unused since READYTORUN_MAJOR_VERSION 10.0 + READYTORUN_HELPER_FltRound = 0xE3, // Unused since READYTORUN_MAJOR_VERSION 10.0 #ifndef _TARGET_X86_ // Personality routines diff --git a/src/coreclr/inc/corinfo.h b/src/coreclr/inc/corinfo.h index a63cf8a5a0cf68..730ffc885702e3 100644 --- a/src/coreclr/inc/corinfo.h +++ b/src/coreclr/inc/corinfo.h @@ -336,7 +336,9 @@ enum CorInfoHelpFunc CORINFO_HELP_LMOD, CORINFO_HELP_ULDIV, CORINFO_HELP_ULMOD, + CORINFO_HELP_LNG2FLT, // Convert a signed int64 to a float CORINFO_HELP_LNG2DBL, // Convert a signed int64 to a double + CORINFO_HELP_ULNG2FLT, // Convert a unsigned int64 to a float CORINFO_HELP_ULNG2DBL, // Convert a unsigned int64 to a double CORINFO_HELP_DBL2INT, CORINFO_HELP_DBL2INT_OVF, diff --git a/src/coreclr/inc/jiteeversionguid.h b/src/coreclr/inc/jiteeversionguid.h index cd481e46fed26d..5e5f8eb5637a4c 100644 --- a/src/coreclr/inc/jiteeversionguid.h +++ b/src/coreclr/inc/jiteeversionguid.h @@ -37,11 +37,11 @@ #include -constexpr GUID JITEEVersionIdentifier = { /* 26d0dde8-bc9d-4543-9b9a-57ad8b1acdc0 */ - 0x26d0dde8, - 0xbc9d, - 0x4543, - {0x9b, 0x9a, 0x57, 0xad, 0x8b, 0x1a, 0xcd, 0xc0} +constexpr GUID JITEEVersionIdentifier = { /* 7ce8764d-ac60-4e05-a6e4-448c1eb8cf35 */ + 0x7ce8764d, + 0xac60, + 0x4e05, + {0xa6, 0xe4, 0x44, 0x8c, 0x1e, 0xb8, 0xcf, 0x35} }; #endif // JIT_EE_VERSIONING_GUID_H diff --git a/src/coreclr/inc/jithelpers.h b/src/coreclr/inc/jithelpers.h index 35994841224f3f..ffb35024a77311 100644 --- a/src/coreclr/inc/jithelpers.h +++ b/src/coreclr/inc/jithelpers.h @@ -84,7 +84,9 @@ JITHELPER(CORINFO_HELP_ULDIV, NULL, METHOD__NIL) JITHELPER(CORINFO_HELP_ULMOD, NULL, METHOD__NIL) #endif // TARGET_64BIT + JITHELPER(CORINFO_HELP_LNG2FLT, JIT_Lng2Flt, METHOD__NIL) JITHELPER(CORINFO_HELP_LNG2DBL, JIT_Lng2Dbl, METHOD__NIL) + JITHELPER(CORINFO_HELP_ULNG2FLT, JIT_ULng2Flt, METHOD__NIL) JITHELPER(CORINFO_HELP_ULNG2DBL, JIT_ULng2Dbl, METHOD__NIL) JITHELPER(CORINFO_HELP_DBL2INT, JIT_Dbl2Int, METHOD__NIL) DYNAMICJITHELPER(CORINFO_HELP_DBL2INT_OVF, NULL, METHOD__MATH__CONVERT_TO_INT32_CHECKED) diff --git a/src/coreclr/inc/readytorun.h b/src/coreclr/inc/readytorun.h index 61e9f50504c3eb..a86b6ad7838b69 100644 --- a/src/coreclr/inc/readytorun.h +++ b/src/coreclr/inc/readytorun.h @@ -20,7 +20,7 @@ // If you update this, ensure you run `git grep MINIMUM_READYTORUN_MAJOR_VERSION` // and handle pending work. #define READYTORUN_MAJOR_VERSION 13 -#define READYTORUN_MINOR_VERSION 0x0000 +#define READYTORUN_MINOR_VERSION 0x0001 #define MINIMUM_READYTORUN_MAJOR_VERSION 13 @@ -408,6 +408,8 @@ enum ReadyToRunHelper READYTORUN_HELPER_Dbl2UIntOvf = 0xD5, READYTORUN_HELPER_Dbl2ULng = 0xD6, READYTORUN_HELPER_Dbl2ULngOvf = 0xD7, + READYTORUN_HELPER_Lng2Flt = 0xD8, + READYTORUN_HELPER_ULng2Flt = 0xD9, // Floating point ops READYTORUN_HELPER_DblRem = 0xE0, diff --git a/src/coreclr/inc/readytorunhelpers.h b/src/coreclr/inc/readytorunhelpers.h index b8f2fd366d36ca..50cd622b948baa 100644 --- a/src/coreclr/inc/readytorunhelpers.h +++ b/src/coreclr/inc/readytorunhelpers.h @@ -86,6 +86,8 @@ HELPER(READYTORUN_HELPER_Dbl2UInt, CORINFO_HELP_DBL2UINT, HELPER(READYTORUN_HELPER_Dbl2UIntOvf, CORINFO_HELP_DBL2UINT_OVF, ) HELPER(READYTORUN_HELPER_Dbl2ULng, CORINFO_HELP_DBL2ULNG, ) HELPER(READYTORUN_HELPER_Dbl2ULngOvf, CORINFO_HELP_DBL2ULNG_OVF, ) +HELPER(READYTORUN_HELPER_Lng2Flt, CORINFO_HELP_LNG2FLT, ) +HELPER(READYTORUN_HELPER_ULng2Flt, CORINFO_HELP_ULNG2FLT, ) HELPER(READYTORUN_HELPER_FltRem, CORINFO_HELP_FLTREM, ) HELPER(READYTORUN_HELPER_DblRem, CORINFO_HELP_DBLREM, ) diff --git a/src/coreclr/jit/gentree.cpp b/src/coreclr/jit/gentree.cpp index 41e097df6a6713..2fb6ce07205b1b 100644 --- a/src/coreclr/jit/gentree.cpp +++ b/src/coreclr/jit/gentree.cpp @@ -15684,7 +15684,6 @@ GenTree* Compiler::gtFoldExprConst(GenTree* tree) case TYP_FLOAT: { -#ifdef TARGET_64BIT if (tree->IsUnsigned() && (lval1 < 0)) { f1 = FloatingPointUtils::convertUInt64ToFloat((uint64_t)lval1); @@ -15693,20 +15692,6 @@ GenTree* Compiler::gtFoldExprConst(GenTree* tree) { f1 = (float)lval1; } -#else - // 32-bit currently does a 2-step conversion, which is incorrect - // but which we are going to take a breaking change around early - // in a release cycle. - - if (tree->IsUnsigned() && (lval1 < 0)) - { - f1 = forceCastToFloat(FloatingPointUtils::convertUInt64ToDouble((uint64_t)lval1)); - } - else - { - f1 = forceCastToFloat((double)lval1); - } -#endif d1 = f1; goto CNS_DOUBLE; diff --git a/src/coreclr/jit/importer.cpp b/src/coreclr/jit/importer.cpp index 7115b19a3bb8d3..d557ac07f8f8b9 100644 --- a/src/coreclr/jit/importer.cpp +++ b/src/coreclr/jit/importer.cpp @@ -8221,7 +8221,11 @@ void Compiler::impImportBlockCode(BasicBlock* block) goto CONV; case CEE_CONV_R_UN: - lclTyp = TYP_DOUBLE; + // Because there is no IL instruction conv.r4.un, compilers consistently + // emit conv.r.un followed immediately by conv.r4 for unsigned->float casts. + // We recognize this pattern and create the intended cast. + // Otherwise, conv.r.un is treated as a cast to double. + lclTyp = ((OPCODE)getU1LittleEndian(codeAddr) == CEE_CONV_R4) ? TYP_FLOAT : TYP_DOUBLE; goto CONV_UN; CONV_UN: diff --git a/src/coreclr/jit/morph.cpp b/src/coreclr/jit/morph.cpp index 74a4e34d34e5f8..68708f06c58636 100644 --- a/src/coreclr/jit/morph.cpp +++ b/src/coreclr/jit/morph.cpp @@ -427,22 +427,16 @@ GenTree* Compiler::fgMorphExpandCast(GenTreeCast* tree) // converts long/ulong --> float/double casts into helper calls. else if (varTypeIsFloating(dstType) && varTypeIsLong(srcType)) { + CorInfoHelpFunc helper = CORINFO_HELP_UNDEF; if (dstType == TYP_FLOAT) { - // there is only a double helper, so we - // - change the dsttype to double - // - insert a cast from double to float - // - recurse into the resulting tree - tree->CastToType() = TYP_DOUBLE; - tree->gtType = TYP_DOUBLE; - - tree = gtNewCastNode(TYP_FLOAT, tree, false, TYP_FLOAT); - - return fgMorphTree(tree); + helper = tree->IsUnsigned() ? CORINFO_HELP_ULNG2FLT : CORINFO_HELP_LNG2FLT; + } + else + { + helper = tree->IsUnsigned() ? CORINFO_HELP_ULNG2DBL : CORINFO_HELP_LNG2DBL; } - if (tree->gtFlags & GTF_UNSIGNED) - return fgMorphCastIntoHelper(tree, CORINFO_HELP_ULNG2DBL, oper); - return fgMorphCastIntoHelper(tree, CORINFO_HELP_LNG2DBL, oper); + return fgMorphCastIntoHelper(tree, helper, oper); } #endif // TARGET_ARM @@ -482,41 +476,23 @@ GenTree* Compiler::fgMorphExpandCast(GenTreeCast* tree) if (srcType == TYP_ULONG) { - return fgMorphCastIntoHelper(tree, CORINFO_HELP_ULNG2DBL, oper); + CorInfoHelpFunc helper = (dstType == TYP_FLOAT) ? CORINFO_HELP_ULNG2FLT : CORINFO_HELP_ULNG2DBL; + return fgMorphCastIntoHelper(tree, helper, oper); } else if (srcType == TYP_UINT && !canUseEvexEncoding()) { oper = gtNewCastNode(TYP_LONG, oper, true, TYP_LONG); oper->gtFlags |= (tree->gtFlags & (GTF_OVERFLOW | GTF_EXCEPT)); tree->ClearUnsigned(); - return fgMorphCastIntoHelper(tree, CORINFO_HELP_LNG2DBL, oper); + + CorInfoHelpFunc helper = (dstType == TYP_FLOAT) ? CORINFO_HELP_LNG2FLT : CORINFO_HELP_LNG2DBL; + return fgMorphCastIntoHelper(tree, helper, oper); } } else if (!tree->IsUnsigned() && (srcType == TYP_LONG) && varTypeIsFloating(dstType)) { - oper = fgMorphCastIntoHelper(tree, CORINFO_HELP_LNG2DBL, oper); - - // Since we don't have a Jit Helper that converts to a TYP_FLOAT - // we just use the one that converts to a TYP_DOUBLE - // and then add a cast to TYP_FLOAT - // - if ((dstType == TYP_FLOAT) && oper->OperIs(GT_CALL)) - { - // Fix the return type to be TYP_DOUBLE - // - oper->gtType = TYP_DOUBLE; - oper->SetMorphed(this); - - // Add a Cast to TYP_FLOAT - // - tree = gtNewCastNode(TYP_FLOAT, oper, false, TYP_FLOAT); - tree->SetMorphed(this); - return tree; - } - else - { - return oper; - } + CorInfoHelpFunc helper = (dstType == TYP_FLOAT) ? CORINFO_HELP_LNG2FLT : CORINFO_HELP_LNG2DBL; + return fgMorphCastIntoHelper(tree, helper, oper); } #endif // TARGET_X86 else if (varTypeIsGC(srcType) != varTypeIsGC(dstType)) diff --git a/src/coreclr/jit/utils.cpp b/src/coreclr/jit/utils.cpp index a9101620f3f2c8..9b7f9aaa8b6349 100644 --- a/src/coreclr/jit/utils.cpp +++ b/src/coreclr/jit/utils.cpp @@ -1529,7 +1529,9 @@ void HelperCallProperties::init() isNoGC = true; FALLTHROUGH; case CORINFO_HELP_LMUL: + case CORINFO_HELP_LNG2FLT: case CORINFO_HELP_LNG2DBL: + case CORINFO_HELP_ULNG2FLT: case CORINFO_HELP_ULNG2DBL: case CORINFO_HELP_DBL2INT: case CORINFO_HELP_DBL2LNG: diff --git a/src/coreclr/jit/valuenum.cpp b/src/coreclr/jit/valuenum.cpp index 3a44a5ea7586e6..606320d3ccc25a 100644 --- a/src/coreclr/jit/valuenum.cpp +++ b/src/coreclr/jit/valuenum.cpp @@ -13814,11 +13814,22 @@ void Compiler::fgValueNumberCastHelper(GenTreeCall* call) switch (helpFunc) { + case CORINFO_HELP_LNG2FLT: + castToType = TYP_FLOAT; + castFromType = TYP_LONG; + break; + case CORINFO_HELP_LNG2DBL: castToType = TYP_DOUBLE; castFromType = TYP_LONG; break; + case CORINFO_HELP_ULNG2FLT: + castToType = TYP_FLOAT; + castFromType = TYP_LONG; + srcIsUnsigned = true; + break; + case CORINFO_HELP_ULNG2DBL: castToType = TYP_DOUBLE; castFromType = TYP_LONG; @@ -14166,7 +14177,9 @@ bool Compiler::fgValueNumberHelperCall(GenTreeCall* call) switch (helpFunc) { + case CORINFO_HELP_LNG2FLT: case CORINFO_HELP_LNG2DBL: + case CORINFO_HELP_ULNG2FLT: case CORINFO_HELP_ULNG2DBL: case CORINFO_HELP_DBL2INT: case CORINFO_HELP_DBL2INT_OVF: diff --git a/src/coreclr/nativeaot/Runtime/MathHelpers.cpp b/src/coreclr/nativeaot/Runtime/MathHelpers.cpp index 9e931b779ec7dd..033edb3de28d6e 100644 --- a/src/coreclr/nativeaot/Runtime/MathHelpers.cpp +++ b/src/coreclr/nativeaot/Runtime/MathHelpers.cpp @@ -96,6 +96,18 @@ FCIMPL1_L(double, RhpULng2Dbl, uint64_t val) } FCIMPLEND +FCIMPL1_L(float, RhpLng2Flt, int64_t val) +{ + return (float)val; +} +FCIMPLEND + +FCIMPL1_L(float, RhpULng2Flt, uint64_t val) +{ + return (float)val; +} +FCIMPLEND + #endif #ifndef HOST_64BIT diff --git a/src/coreclr/nativeaot/Runtime/inc/ModuleHeaders.h b/src/coreclr/nativeaot/Runtime/inc/ModuleHeaders.h index 033331ece0656f..f8efbe166ff219 100644 --- a/src/coreclr/nativeaot/Runtime/inc/ModuleHeaders.h +++ b/src/coreclr/nativeaot/Runtime/inc/ModuleHeaders.h @@ -12,7 +12,7 @@ struct ReadyToRunHeaderConstants static const uint32_t Signature = 0x00525452; // 'RTR' static const uint32_t CurrentMajorVersion = 13; - static const uint32_t CurrentMinorVersion = 0; + static const uint32_t CurrentMinorVersion = 1; }; struct ReadyToRunHeader diff --git a/src/coreclr/tools/Common/Internal/Runtime/ModuleHeaders.cs b/src/coreclr/tools/Common/Internal/Runtime/ModuleHeaders.cs index bf24777abc20c9..a0d0370b253c33 100644 --- a/src/coreclr/tools/Common/Internal/Runtime/ModuleHeaders.cs +++ b/src/coreclr/tools/Common/Internal/Runtime/ModuleHeaders.cs @@ -16,7 +16,7 @@ internal struct ReadyToRunHeaderConstants public const uint Signature = 0x00525452; // 'RTR' public const ushort CurrentMajorVersion = 13; - public const ushort CurrentMinorVersion = 0; + public const ushort CurrentMinorVersion = 1; } #if READYTORUN #pragma warning disable 0169 diff --git a/src/coreclr/tools/Common/Internal/Runtime/ReadyToRunConstants.cs b/src/coreclr/tools/Common/Internal/Runtime/ReadyToRunConstants.cs index 73fc45b06e2806..43f7586507fbff 100644 --- a/src/coreclr/tools/Common/Internal/Runtime/ReadyToRunConstants.cs +++ b/src/coreclr/tools/Common/Internal/Runtime/ReadyToRunConstants.cs @@ -312,6 +312,8 @@ public enum ReadyToRunHelper Dbl2UIntOvf = 0xD5, Dbl2ULng = 0xD6, Dbl2ULngOvf = 0xD7, + Lng2Flt = 0xD8, + ULng2Flt = 0xD9, // Floating point ops DblRem = 0xE0, diff --git a/src/coreclr/tools/Common/JitInterface/CorInfoHelpFunc.cs b/src/coreclr/tools/Common/JitInterface/CorInfoHelpFunc.cs index d1733990dc533c..14a24e226145a6 100644 --- a/src/coreclr/tools/Common/JitInterface/CorInfoHelpFunc.cs +++ b/src/coreclr/tools/Common/JitInterface/CorInfoHelpFunc.cs @@ -28,7 +28,9 @@ public enum CorInfoHelpFunc CORINFO_HELP_LMOD, CORINFO_HELP_ULDIV, CORINFO_HELP_ULMOD, + CORINFO_HELP_LNG2FLT, // Convert a signed int64 to a float CORINFO_HELP_LNG2DBL, // Convert a signed int64 to a double + CORINFO_HELP_ULNG2FLT, // Convert a unsigned int64 to a float CORINFO_HELP_ULNG2DBL, // Convert a unsigned int64 to a double CORINFO_HELP_DBL2INT, CORINFO_HELP_DBL2INT_OVF, diff --git a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/JitHelper.cs b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/JitHelper.cs index d40133b846276d..5c58b09a0302af 100644 --- a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/JitHelper.cs +++ b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/JitHelper.cs @@ -182,6 +182,12 @@ public static void GetEntryPoint(TypeSystemContext context, ReadyToRunHelper id, case ReadyToRunHelper.ULng2Dbl: mangledName = "RhpULng2Dbl"; break; + case ReadyToRunHelper.Lng2Flt: + mangledName = "RhpLng2Flt"; + break; + case ReadyToRunHelper.ULng2Flt: + mangledName = "RhpULng2Flt"; + break; case ReadyToRunHelper.Dbl2Lng: mangledName = "RhpDbl2Lng"; diff --git a/src/coreclr/tools/aot/ILCompiler.ReadyToRun/JitInterface/CorInfoImpl.ReadyToRun.cs b/src/coreclr/tools/aot/ILCompiler.ReadyToRun/JitInterface/CorInfoImpl.ReadyToRun.cs index f58775b559198c..4ec4ff34e6e1a7 100644 --- a/src/coreclr/tools/aot/ILCompiler.ReadyToRun/JitInterface/CorInfoImpl.ReadyToRun.cs +++ b/src/coreclr/tools/aot/ILCompiler.ReadyToRun/JitInterface/CorInfoImpl.ReadyToRun.cs @@ -1128,6 +1128,12 @@ private ISymbolNode GetHelperFtnUncached(CorInfoHelpFunc ftnNum) case CorInfoHelpFunc.CORINFO_HELP_ULNG2DBL: id = ReadyToRunHelper.ULng2Dbl; break; + case CorInfoHelpFunc.CORINFO_HELP_LNG2FLT: + id = ReadyToRunHelper.Lng2Flt; + break; + case CorInfoHelpFunc.CORINFO_HELP_ULNG2FLT: + id = ReadyToRunHelper.ULng2Flt; + break; case CorInfoHelpFunc.CORINFO_HELP_DIV: id = ReadyToRunHelper.Div; diff --git a/src/coreclr/tools/aot/ILCompiler.Reflection.ReadyToRun/ReadyToRunSignature.cs b/src/coreclr/tools/aot/ILCompiler.Reflection.ReadyToRun/ReadyToRunSignature.cs index 4a62123d694af8..d8759785554945 100644 --- a/src/coreclr/tools/aot/ILCompiler.Reflection.ReadyToRun/ReadyToRunSignature.cs +++ b/src/coreclr/tools/aot/ILCompiler.Reflection.ReadyToRun/ReadyToRunSignature.cs @@ -1929,6 +1929,14 @@ private void ParseHelper(StringBuilder builder) builder.Append("DBL2ULNGOVF"); break; + case ReadyToRunHelper.Lng2Flt: + builder.Append("LNG2FLT"); + break; + + case ReadyToRunHelper.ULng2Flt: + builder.Append("ULNG2FLT"); + break; + // Floating point ops case ReadyToRunHelper.DblRem: builder.Append("DBL_REM"); diff --git a/src/coreclr/tools/aot/ILCompiler.RyuJit/JitInterface/CorInfoImpl.RyuJit.cs b/src/coreclr/tools/aot/ILCompiler.RyuJit/JitInterface/CorInfoImpl.RyuJit.cs index b4933c28b25afc..a3e761537d0a51 100644 --- a/src/coreclr/tools/aot/ILCompiler.RyuJit/JitInterface/CorInfoImpl.RyuJit.cs +++ b/src/coreclr/tools/aot/ILCompiler.RyuJit/JitInterface/CorInfoImpl.RyuJit.cs @@ -699,6 +699,12 @@ private ISymbolNode GetHelperFtnUncached(CorInfoHelpFunc ftnNum) case CorInfoHelpFunc.CORINFO_HELP_DBL2ULNG_OVF: id = ReadyToRunHelper.Dbl2ULngOvf; break; + case CorInfoHelpFunc.CORINFO_HELP_LNG2FLT: + id = ReadyToRunHelper.Lng2Flt; + break; + case CorInfoHelpFunc.CORINFO_HELP_ULNG2FLT: + id = ReadyToRunHelper.ULng2Flt; + break; case CorInfoHelpFunc.CORINFO_HELP_FLTREM: id = ReadyToRunHelper.FltRem; diff --git a/src/coreclr/vm/jithelpers.cpp b/src/coreclr/vm/jithelpers.cpp index 3bdde3488e08ee..296069a9d170c4 100644 --- a/src/coreclr/vm/jithelpers.cpp +++ b/src/coreclr/vm/jithelpers.cpp @@ -164,6 +164,14 @@ HCIMPLEND #include +/*********************************************************************/ +HCIMPL1_V(float, JIT_ULng2Flt, uint64_t val) +{ + FCALL_CONTRACT; + return (float)val; +} +HCIMPLEND + /*********************************************************************/ HCIMPL1_V(double, JIT_ULng2Dbl, uint64_t val) { @@ -172,6 +180,14 @@ HCIMPL1_V(double, JIT_ULng2Dbl, uint64_t val) } HCIMPLEND +/*********************************************************************/ +HCIMPL1_V(float, JIT_Lng2Flt, int64_t val) +{ + FCALL_CONTRACT; + return (float)val; +} +HCIMPLEND + /*********************************************************************/ HCIMPL1_V(double, JIT_Lng2Dbl, int64_t val) { diff --git a/src/tests/JIT/Regression/JitBlue/Runtime_106338/Runtime_106338.cs b/src/tests/JIT/Regression/JitBlue/Runtime_106338/Runtime_106338.cs index ed1b5cd56ace7a..450c002a5d9479 100644 --- a/src/tests/JIT/Regression/JitBlue/Runtime_106338/Runtime_106338.cs +++ b/src/tests/JIT/Regression/JitBlue/Runtime_106338/Runtime_106338.cs @@ -22,15 +22,7 @@ public static void TestEntryPoint() float vr11 = 4294967295U | vr10; uint result = BitConverter.SingleToUInt32Bits(vr11); - if ((RuntimeInformation.ProcessArchitecture == Architecture.Arm64) || (RuntimeInformation.ProcessArchitecture == Architecture.X64)) - { - // Expected to cast ulong -> float directly - Assert.Equal(1600094603U, result); - } - else - { - // Expected to cast ulong -> double -> float - Assert.Equal(1600094604U, result); - } + // Expected to cast ulong -> float directly + Assert.Equal(1600094603U, result); } } \ No newline at end of file