bool Lowering::TryTransformStoreObjAsStoreInd(GenTreeBlk* blkNode)
{
assert(blkNode->OperIs(GT_STORE_BLK, GT_STORE_DYN_BLK, GT_STORE_OBJ));
+ return false;
+#if 0 // the optimization is temporary disabled due to https://github.com/dotnet/wpf/issues/3226 issue.
if (blkNode->OperIs(GT_STORE_DYN_BLK))
{
return false;
}
LowerStoreIndirCommon(blkNode);
return true;
+#endif
}
--- /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;
+using System.Runtime.InteropServices;
+
+[StructLayout(LayoutKind.Sequential)]
+class POINT
+{
+ public int x;
+ public int y;
+ public override string ToString() => $"{{{x}, {y}}}";
+}
+
+[StructLayout(LayoutKind.Sequential)]
+class MINMAXINFO
+{
+ public POINT ptMinTrackSize = new POINT();
+ public POINT ptMaxTrackSize = new POINT();
+}
+
+class Test
+{
+ static void WmGetMinMaxInfo(IntPtr lParam)
+ {
+ MINMAXINFO mmi = new MINMAXINFO();
+
+ mmi.ptMinTrackSize.x = 100101;
+ mmi.ptMinTrackSize.y = 102103;
+ mmi.ptMaxTrackSize.x = 200201;
+ mmi.ptMaxTrackSize.y = 202203;
+
+ Marshal.StructureToPtr(mmi, lParam, true);
+ }
+
+ public unsafe static int Main()
+ {
+ MINMAXINFO mmi = new MINMAXINFO();
+ IntPtr pmmi = Marshal.AllocHGlobal(Marshal.SizeOf(mmi));
+ WmGetMinMaxInfo(pmmi);
+ mmi = (MINMAXINFO) Marshal.PtrToStructure(pmmi, typeof(MINMAXINFO));
+ bool valid = mmi.ptMinTrackSize.x == 100101 && mmi.ptMinTrackSize.y == 102103 && mmi.ptMaxTrackSize.x == 200201 && mmi.ptMaxTrackSize.y == 202203;
+ if (!valid)
+ {
+ Console.WriteLine($"Got {mmi.ptMinTrackSize}, expected {{100101, 102103}}");
+ Console.WriteLine($"Got {mmi.ptMaxTrackSize}, expected {{200201, 202203}}");
+ }
+ return valid ? 100 : -1;
+ }
+}
--- /dev/null
+<Project Sdk="Microsoft.NET.Sdk">
+ <PropertyGroup>
+ <OutputType>Exe</OutputType>
+ </PropertyGroup>
+ <PropertyGroup>
+ <DebugType />
+ <Optimize>True</Optimize>
+ <AllowUnsafeBlocks>True</AllowUnsafeBlocks>
+ </PropertyGroup>
+ <ItemGroup>
+ <Compile Include="$(MSBuildProjectName).cs" />
+ </ItemGroup>
+</Project>