This repository was archived by the owner on Jan 23, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +60
-0
lines changed
tests/src/JIT/Regression/JitBlue/GitHub_15319 Expand file tree Collapse file tree 3 files changed +60
-0
lines changed Original file line number Diff line number Diff line change @@ -490,6 +490,11 @@ GenTreePtr Compiler::fgMorphCast(GenTreePtr tree)
490490 shiftAmount = gtFoldExpr(shiftAmount);
491491 oper->gtOp.gtOp2 = shiftAmount;
492492
493+ #if DEBUG
494+ // We may remorph the shift amount tree again later, so clear any morphed flag.
495+ shiftAmount->gtDebugFlags &= ~GTF_DEBUG_NODE_MORPHED;
496+ #endif // DEBUG
497+
493498 if (shiftAmount->IsIntegralConst())
494499 {
495500 const ssize_t shiftAmountValue = shiftAmount->AsIntCon()->IconValue();
Original file line number Diff line number Diff line change 1+ // Licensed to the .NET Foundation under one or more agreements.
2+ // The .NET Foundation licenses this file to you under the MIT license.
3+ // See the LICENSE file in the project root for more information.
4+
5+ // Test for remorphing subexpressions in casts of long shifts.
6+
7+ .assembly extern System.Private.CoreLib {}
8+ .assembly GitHub_15319_1 {}
9+
10+ .class private auto ansi beforefieldinit Q
11+ extends [System.Private.CoreLib]System.Object
12+ {
13+ .method public hidebysig static int32 P(int64 x) cil managed noinlining
14+ {
15+ ldarg.s 0x0
16+ dup
17+ ldarg.s 0x0
18+ clt
19+ shl
20+ ret
21+ }
22+
23+ .method public hidebysig static int32 Main(string[] args) cil managed
24+ {
25+ .entrypoint
26+ ldc.i4.s 100
27+ conv.i8
28+ call int32 Q::P(int64)
29+ ret
30+ }
31+ }
Original file line number Diff line number Diff line change 1+ <?xml version =" 1.0" encoding =" utf-8" ?>
2+ <Project ToolsVersion =" 12.0" DefaultTargets =" Build" xmlns =" http://schemas.microsoft.com/developer/msbuild/2003" >
3+ <Import Project =" $([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
4+ <PropertyGroup >
5+ <Configuration Condition =" '$(Configuration)' == '' " >Debug</Configuration >
6+ <Platform Condition =" '$(Platform)' == '' " >AnyCPU</Platform >
7+ <AssemblyName >$(MSBuildProjectName)</AssemblyName >
8+ <ProjectGuid >{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid >
9+ <OutputType >Exe</OutputType >
10+ <SolutionDir Condition =" $(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'" >..\..\</SolutionDir >
11+ <CLRTestPriority >1</CLRTestPriority >
12+ </PropertyGroup >
13+ <PropertyGroup Condition =" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' " ></PropertyGroup >
14+ <PropertyGroup Condition =" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' " ></PropertyGroup >
15+ <PropertyGroup >
16+ <DebugType >None</DebugType >
17+ <Optimize >True</Optimize >
18+ </PropertyGroup >
19+ <ItemGroup >
20+ <Compile Include =" GitHub_15319_1.il" />
21+ </ItemGroup >
22+ <Import Project =" $([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
23+ <PropertyGroup Condition =" '$(MsBuildProjectDirOverride)' != '' " ></PropertyGroup >
24+ </Project >
You can’t perform that action at this time.
0 commit comments