未验证 提交 f077de01 编写于 作者: A Andy Ayers 提交者: GitHub

JIT: add ssa accounting to morph's div opts (#85332)

RBO triggered a morph opt that cloned an SSA local, throwing off the SSA
accounting. Fix by invoking the accounting helper after the morph expansion.

Closes #85226.
上级 2802c972
......@@ -12152,6 +12152,8 @@ GenTree* Compiler::fgMorphModToSubMulDiv(GenTreeOp* tree)
result->gtDebugFlags |= GTF_DEBUG_NODE_MORPHED;
#endif
optRecordSsaUses(result, compCurBB);
div->CheckDivideByConstOptimized(this);
return result;
......
// 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 Xunit;
// Generated by Fuzzlyn v1.5 on 2023-04-23 17:14:26
// Run on X64 Windows
// Seed: 11244895947685014560
// Reduced from 7.8 KiB to 0.3 KiB in 00:00:41
// Hits JIT assert in Release:
// Assertion failed '!"SSA check failures"' in 'Program:M1()' during 'Redundant branch opts' (IL size 29; hash 0xaf510bb6; FullOpts)
//
// File: D:\a\_work\1\s\src\coreclr\jit\fgdiagnostic.cpp Line: 4392
//
public class Runtime_85226
{
[Fact]
public static int Test()
{
M1();
return 100;
}
private static void M1()
{
for (int var0 = 0; var0 < -1; var0++)
{
short var1 = 2;
if (((ushort)((var0 % (var1 | 1)) % 0) < 0UL))
{
return;
}
}
}
}
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Optimize>True</Optimize>
</PropertyGroup>
<ItemGroup>
<Compile Include="$(MSBuildProjectName).cs" />
</ItemGroup>
</Project>
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册