-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
JIT: Fix STORE_DYN_BLK morphing (#73844)
Make sure to properly call SetIndirExceptionFlags and to properly mark defs (that will otherwise hit asserts in rationalization).
- Loading branch information
1 parent
3824cb2
commit c302b7b
Showing
4 changed files
with
53 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
src/tests/JIT/Regression/JitBlue/Runtime_73821/Runtime_73821.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
|
||
using System.Runtime.CompilerServices; | ||
|
||
unsafe class Runtime_73821 | ||
{ | ||
public struct S | ||
{ | ||
public int F; | ||
} | ||
|
||
[MethodImpl(MethodImplOptions.NoInlining)] | ||
public static S Test1(int val) | ||
{ | ||
S s; | ||
int size = sizeof(S); | ||
Unsafe.CopyBlockUnaligned(&s, &val, (uint)size); | ||
return s; | ||
} | ||
|
||
[MethodImpl(MethodImplOptions.NoInlining)] | ||
public static int Test2(int val) | ||
{ | ||
int val2; | ||
int size = sizeof(int); | ||
Unsafe.CopyBlockUnaligned(&val2, &val, (uint)size); | ||
return val2; | ||
} | ||
|
||
static int Main() | ||
{ | ||
return Test1(33).F + Test2(67); | ||
} | ||
} |
10 changes: 10 additions & 0 deletions
10
src/tests/JIT/Regression/JitBlue/Runtime_73821/Runtime_73821.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
<PropertyGroup> | ||
<OutputType>Exe</OutputType> | ||
<Optimize>True</Optimize> | ||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<Compile Include="$(MSBuildProjectName).cs" /> | ||
</ItemGroup> | ||
</Project> |