Uh oh!
There was an error while loading. Please reload this page.
Fix for out of range mask pattern assert - #132981
Conversation
|
Azure Pipelines: Successfully started running 5 pipeline(s). 11 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch |
dhartglassMSFT
commented
Aug 31, 2026
Hi @a74nh or @SwapnilGaikwad very small change here, but appreciate a quick look to make sure I got this case right One of the fuzzers hits this case frequently |
|
Azure Pipelines: Successfully started running 5 pipeline(s). 11 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
There was a problem hiding this comment.
🟡 Changes recommended
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Fixes SVE mask-pattern constant evaluation in the CoreCLR JIT so that out-of-range SveMaskPattern values no longer trip an assertion and instead produce an all-false mask, and adds a regression test.
Changes:
- Update
EvaluateSimdPatternToMaskto treat patterns that exceed the current vector lane count as “no active lanes” (all zeros) instead of asserting. - Add a JIT regression test covering
Sve.CreateTrueMask*with an out-of-rangeSveMaskPattern. - Wire the new regression test into the merged regression test project.
File summaries
| File | Description |
|---|---|
| src/coreclr/jit/simd.h | Adjusts SVE pattern→mask evaluation to handle out-of-range patterns by producing an all-false mask instead of asserting. |
| src/tests/JIT/Regression/JitBlue/Runtime_132910/Runtime_132910.cs | Adds a regression test for Sve.CreateTrueMask* handling out-of-range mask patterns. |
| src/tests/JIT/Regression/Regression_ro_2.csproj | Includes the new regression test in the merged regression project. |
Review details
- Files reviewed: 3/3 changed files
- Comments generated: 2
- Review effort level: Lite
| [MethodImpl(MethodImplOptions.NoInlining)] | ||
| private static Vector<float> Repro() => Sve.CreateTrueMaskSingle(SveMaskPattern.VectorCount5); |
| _ = Repro(); | ||
SwapnilGaikwad
commented
Sep 1, 2026
Overall LGTM! Copilot's comments are worth adding, especially the VL>128bits scenario. |
There was a problem hiding this comment.
🟢 Approval recommended
The behavioral change is localized, matches documented SVE semantics for out-of-range constraints, and is covered by a targeted regression test.
Review details
- Files reviewed: 3/3 changed files
- Comments generated: 0 new
- Review effort level: Lite
EvaluateSimdPatternToMask assertion if an out-of-range mask pattern was supplied
Sve.CreateTrueMaskSingle(SveMaskPattern.VectorCount5);The evaluator should instead allow this through and treat mask constant as all zeros:
https://support.arm.com/documentation/ddi0602/2026-06/SVE-Instructions/PTRUE--predicate---Initialize-predicate-from-named-constraint-?lang=en
fixes#132910