var_types toType = op1->AsCast()->CastToType();
bool isUnsigned = op1->IsUnsigned();
- if ((op2->CastFromType() != fromType) || (op2->CastToType() != toType) || (op2->IsUnsigned() != isUnsigned))
+ if (varTypeIsFloating(fromType) || (op2->CastFromType() != fromType) || (op2->CastToType() != toType) ||
+ (op2->IsUnsigned() != isUnsigned))
{
return nullptr;
}
--- /dev/null
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+
+using System;
+using System.Runtime.CompilerServices;
+
+public class Runtime_61629
+{
+ public static int Main() =>
+ Test(100, 200.0) + Test(Math.PI, Math.PI) - 72;
+
+ [MethodImpl(MethodImplOptions.NoInlining)]
+ static int Test(double a, double b)
+ {
+ return (int)a ^ (int)b >> 32;
+ }
+}
--- /dev/null
+<Project Sdk="Microsoft.NET.Sdk">
+ <PropertyGroup>
+ <OutputType>Exe</OutputType>
+ <Optimize>True</Optimize>
+ </PropertyGroup>
+ <ItemGroup>
+ <Compile Include="$(MSBuildProjectName).cs" />
+ </ItemGroup>
+</Project>
\ No newline at end of file