From 368d67fc21581a80857ce5fb678bcc4f6393b9b0 Mon Sep 17 00:00:00 2001 From: Mike Danes Date: Tue, 28 Jun 2016 21:28:51 +0300 Subject: [PATCH] Remove misplaced call to genUnspillRegIfNeeded Commit migrated from https://github.com/dotnet/coreclr/commit/a29cdf2ff411e2ab3e63592139f89d4b4dce0a37 --- src/coreclr/src/jit/codegenxarch.cpp | 2 - .../Regression/JitBlue/GitHub_5047/GitHub_5047.cs | 46 ++++++++++++++++++++++ .../JitBlue/GitHub_5047/GitHub_5047.csproj | 40 +++++++++++++++++++ .../JIT/Regression/JitBlue/GitHub_5047/app.config | 27 +++++++++++++ 4 files changed, 113 insertions(+), 2 deletions(-) create mode 100644 src/coreclr/tests/src/JIT/Regression/JitBlue/GitHub_5047/GitHub_5047.cs create mode 100644 src/coreclr/tests/src/JIT/Regression/JitBlue/GitHub_5047/GitHub_5047.csproj create mode 100644 src/coreclr/tests/src/JIT/Regression/JitBlue/GitHub_5047/app.config diff --git a/src/coreclr/src/jit/codegenxarch.cpp b/src/coreclr/src/jit/codegenxarch.cpp index 6c356e6..9fb2d1d 100755 --- a/src/coreclr/src/jit/codegenxarch.cpp +++ b/src/coreclr/src/jit/codegenxarch.cpp @@ -6019,8 +6019,6 @@ void CodeGen::genCallInstruction(GenTreePtr node) regSet.rsSpillFPStack(call); call->gtFlags |= GTF_SPILLED; call->gtFlags &= ~GTF_SPILL; - - genUnspillRegIfNeeded(call); } else #endif // _TARGET_X86_ diff --git a/src/coreclr/tests/src/JIT/Regression/JitBlue/GitHub_5047/GitHub_5047.cs b/src/coreclr/tests/src/JIT/Regression/JitBlue/GitHub_5047/GitHub_5047.cs new file mode 100644 index 0000000..9636a91 --- /dev/null +++ b/src/coreclr/tests/src/JIT/Regression/JitBlue/GitHub_5047/GitHub_5047.cs @@ -0,0 +1,46 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System; +using System.Runtime.CompilerServices; + +class Program +{ + [MethodImpl(MethodImplOptions.NoInlining)] + public static float Get42() + { + return 42; + } + + [MethodImpl(MethodImplOptions.NoInlining)] + public static float Get43() + { + return 43; + } + + [MethodImpl(MethodImplOptions.NoInlining)] + public static float Test() + { + float x = Get42(); + x *= Get43(); + return x; + } + + static int Main() + { + const int Pass = 100; + const int Fail = -1; + + if (Test() == 1806) + { + Console.WriteLine("Passed"); + return Pass; + } + else + { + Console.WriteLine("Failed"); + return Fail; + } + } +} diff --git a/src/coreclr/tests/src/JIT/Regression/JitBlue/GitHub_5047/GitHub_5047.csproj b/src/coreclr/tests/src/JIT/Regression/JitBlue/GitHub_5047/GitHub_5047.csproj new file mode 100644 index 0000000..25691a0 --- /dev/null +++ b/src/coreclr/tests/src/JIT/Regression/JitBlue/GitHub_5047/GitHub_5047.csproj @@ -0,0 +1,40 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + ..\..\ + 7a9bfb7d + + + + + + + + + True + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + diff --git a/src/coreclr/tests/src/JIT/Regression/JitBlue/GitHub_5047/app.config b/src/coreclr/tests/src/JIT/Regression/JitBlue/GitHub_5047/app.config new file mode 100644 index 0000000..62803f5 --- /dev/null +++ b/src/coreclr/tests/src/JIT/Regression/JitBlue/GitHub_5047/app.config @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file -- 2.7.4