-
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.
Do not consider single-reg bitcasts multi-reg nodes (#72020)
* Fix an ARM codegen bug * Do not consider single-reg bitcasts multi-reg nodes * Add a test
- Loading branch information
1 parent
f025132
commit 4cbe6f9
Showing
5 changed files
with
54 additions
and
12 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
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
29 changes: 29 additions & 0 deletions
29
src/tests/JIT/Regression/JitBlue/Runtime_71831/Runtime_71831.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,29 @@ | ||
// 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; | ||
|
||
unsafe class Runtime_71831 | ||
{ | ||
private static int Main() | ||
{ | ||
return Problem(100) ? 101 : 100; | ||
} | ||
|
||
[MethodImpl(MethodImplOptions.NoInlining)] | ||
private static bool Problem(int i) | ||
{ | ||
StructWithFloats s = default; | ||
|
||
s.FloatOne = BitConverter.Int32BitsToSingle(i); | ||
|
||
return s.FloatOne != *(float*)&i; | ||
} | ||
|
||
struct StructWithFloats | ||
{ | ||
public float FloatOne; | ||
public float FloatTwo; | ||
} | ||
} |
18 changes: 18 additions & 0 deletions
18
src/tests/JIT/Regression/JitBlue/Runtime_71831/Runtime_71831.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,18 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
<PropertyGroup> | ||
<OutputType>Exe</OutputType> | ||
<Optimize>True</Optimize> | ||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks> | ||
<CLRTestBatchPreCommands><![CDATA[ | ||
$(CLRTestBatchPreCommands) | ||
set DOTNET_JitNoStructPromotion=1 | ||
]]></CLRTestBatchPreCommands> | ||
<BashCLRTestPreCommands><![CDATA[ | ||
$(BashCLRTestPreCommands) | ||
export DOTNET_JitNoStructPromotion=1 | ||
]]></BashCLRTestPreCommands> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<Compile Include="$(MSBuildProjectName).cs" /> | ||
</ItemGroup> | ||
</Project> |