Skip to content

Add regression test for #124749 - #130936

Merged
dhartglassMSFT merged 1 commit into
dotnet:mainfrom
tannergooding:tannergooding-jitblue-runtime-124749
Jul 17, 2026
Merged

dhartglassMSFT merged 1 commit into
dotnet:mainfrom
tannergooding:tannergooding-jitblue-runtime-124749

Conversation

@tannergooding

Copy link
Copy Markdown
Member

Adds a JIT regression test for the '"'"'!"Write to unaliased local overlaps outstanding read"'"'"' assert (lir.cpp) reported in #124749, found by Fuzzlyn.

The bug was already fixed by #128962. fgOptimizeHWIntrinsic rewrites Add(Neg(X), Y) to Sub(Y, X), reversing operand evaluation order (for SIMD, negation is Subtract(0, X)). When CSE had planted a COMMA(STORE cse_temp, use) def inside X and left a bare LCL_VAR cse_temp use as Y, the swap scheduled the use before its def, tripping the use-before-def assert during Rationalization. #128962 guards the transform with gtCanSwapOrder(op1, op2), which returns false here because op1 carries GTF_ASG (the store) while op2 is non-invariant.

This just adds coverage; there is no product change.


Verification:

  • Reproduced the exact assert in Program:M0() via SPMI replay at the collection'"'"'s compatible commit; backporting only the gtCanSwapOrder guard made it disappear.
  • On current main, removing the guard and rebuilding clrjit.dll reproduced the assert through this repro; restoring it produced a clean run.

I could not execute-verify locally as this machine lacks AVX512, so the test no-ops here, but the SPMI collection is this exact repro and validates it on AVX512 legs.

Closes #124749

Note

This PR description was drafted by Copilot.

Copilot AI review requested due to automatic review settings July 17, 2026 00:08
@github-actions github-actions Bot added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label Jul 17, 2026
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 3 pipeline(s).
12 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

@dotnet-policy-service

Copy link
Copy Markdown
Contributor

Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch
See info in area-owners.md if you want to be subscribed.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new JitBlue regression test case to cover a previously-fixed JIT assert scenario involving AVX-512 intrinsics, ensuring the repro remains exercised in CI.

Changes:

  • Adds a new JIT regression test project Runtime_124749 with process isolation and tiered compilation disabled.
  • Adds a new xUnit-based test reproducing the intrinsic pattern and guarding execution on Avx512CD.VL.IsSupported.
Show a summary per file
File Description
src/tests/JIT/Regression/JitBlue/Runtime_124749/Runtime_124749.csproj New test project with required isolation and env var to stabilize JIT behavior for the repro.
src/tests/JIT/Regression/JitBlue/Runtime_124749/Runtime_124749.cs New xUnit regression test exercising the intrinsic sequence and gating on AVX-512 CD+VL support.

Copilot's findings

  • Files reviewed: 2/2 changed files
  • Comments generated: 0

@tannergooding

Copy link
Copy Markdown
Member Author

CC. @dotnet/jit-contrib, @dhartglassMSFT this is just a test only change ensuring the regression is covered for xarch. David fixed the underlying issue in #128962 already, but only covered the Arm64 side since he was fixing a different tracked issue

@dhartglassMSFT

Copy link
Copy Markdown
Contributor

lgtm, thanks for adding the test

@dhartglassMSFT
dhartglassMSFT merged commit f94898a into dotnet:main Jul 17, 2026
91 checks passed
@tannergooding
tannergooding deleted the tannergooding-jitblue-runtime-124749 branch July 17, 2026 18:32
@dotnet-milestone-bot dotnet-milestone-bot Bot added this to the 11.0-preview7 milestone Jul 18, 2026
@github-actions github-actions Bot locked and limited conversation to collaborators Aug 17, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

JIT: Assertion failed '!"Write to unaliased local overlaps outstanding read"' during 'Rationalize IR' with AVX intrinsics

3 participants