-
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 indir flags propagation for a couple of cases (#79751)
SetIndirExceptionFlags expects only unary indirs (reads) and does not handle other cases correctly. Add an assert for it and fix the users. Only fgMorphStoreDynBlock had the bug since gtUpdateNodeOperSideEffects assumes the caller will propagate effect flags from operands afterwards. Extracted from early liveness PR. Fix #79750
- Loading branch information
1 parent
48edd27
commit e66a6a3
Showing
4 changed files
with
48 additions
and
3 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
23 changes: 23 additions & 0 deletions
23
src/tests/JIT/Regression/JitBlue/Runtime_79750/Runtime_79750.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,23 @@ | ||
// 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; | ||
|
||
class Runtime_79750 | ||
{ | ||
static int Main(string[] args) | ||
{ | ||
byte dest = 0; | ||
byte source = 100; | ||
uint size = GetSize(); | ||
Unsafe.CopyBlock(ref dest, ref GetAddr(ref source), size); | ||
|
||
return dest; | ||
} | ||
|
||
[MethodImpl(MethodImplOptions.NoInlining)] | ||
private static ref byte GetAddr(ref byte a) => ref a; | ||
|
||
[MethodImpl(MethodImplOptions.NoInlining)] | ||
private static uint GetSize() => 1; | ||
} |
10 changes: 10 additions & 0 deletions
10
src/tests/JIT/Regression/JitBlue/Runtime_79750/Runtime_79750.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> |