-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix contained LCL_VAR_ADDR in RMW. (#50669)
* Add repro test. * Fix the bug. * change class name in the test
- Loading branch information
Sergey Andreenko
committed
Apr 8, 2021
1 parent
5bad843
commit a06eccb
Showing
3 changed files
with
101 additions
and
6 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
66 changes: 66 additions & 0 deletions
66
src/tests/JIT/Regression/JitBlue/Runtime_41073/Runtime_41073.il
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,66 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
|
||
|
||
.assembly extern System.Runtime | ||
{ | ||
} | ||
|
||
.assembly extern System.Runtime.CompilerServices.Unsafe | ||
{ | ||
} | ||
|
||
.assembly extern System.Console | ||
{ | ||
} | ||
|
||
.assembly Runtime_41073 | ||
{ | ||
} | ||
|
||
.class private auto ansi beforefieldinit Runtime_41073 | ||
extends [System.Runtime]System.Object | ||
{ | ||
.method private hidebysig static float32 | ||
PassNullByref(float32 f) cil managed noinlining | ||
{ | ||
// Code size 20 (0x14) | ||
.maxstack 8 | ||
IL_0000: ldarga.s f | ||
IL_0007: ldarga.s f | ||
IL_000e: ldind.i8 | ||
IL_000f: ldc.i8 123 | ||
IL_0010: add | ||
IL_0011: stind.i8 | ||
IL_0012: ldarg.0 | ||
IL_0013: ret | ||
} // end of method Runtime_41073::PassNullByref | ||
|
||
.method public hidebysig static int32 Main() cil managed | ||
{ | ||
.entrypoint | ||
// Code size 27 (0x1b) | ||
.maxstack 1 | ||
.locals init (float32 V_0) | ||
IL_0000: ldc.r4 0.0 | ||
IL_0005: call float32 Runtime_41073::PassNullByref(float32) | ||
IL_000a: stloc.0 | ||
IL_000b: ldloca.s V_0 | ||
IL_000d: call !!1& [System.Runtime.CompilerServices.Unsafe]System.Runtime.CompilerServices.Unsafe::As<float32,int32>(!!0&) | ||
IL_0012: ldind.i4 | ||
IL_0013: call void [System.Console]System.Console::WriteLine(int32) | ||
IL_0018: ldc.i4.s 100 | ||
IL_001a: ret | ||
} // end of method Runtime_41073::Main | ||
|
||
.method public hidebysig specialname rtspecialname | ||
instance void .ctor() cil managed | ||
{ | ||
// Code size 7 (0x7) | ||
.maxstack 8 | ||
IL_0000: ldarg.0 | ||
IL_0001: call instance void [System.Runtime]System.Object::.ctor() | ||
IL_0006: ret | ||
} // end of method Runtime_41073::.ctor | ||
|
||
} // end of class Runtime_41073 |
13 changes: 13 additions & 0 deletions
13
src/tests/JIT/Regression/JitBlue/Runtime_41073/Runtime_41073.ilproj
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,13 @@ | ||
<Project Sdk="Microsoft.NET.Sdk.IL"> | ||
<PropertyGroup> | ||
<OutputType>Exe</OutputType> | ||
</PropertyGroup> | ||
<PropertyGroup> | ||
<DebugType>None</DebugType> | ||
<Optimize>True</Optimize> | ||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<Compile Include="$(MSBuildProjectName).il" /> | ||
</ItemGroup> | ||
</Project> |