[cDAC] PR 1/5: Stack walk GC reference scanning and bug fixes#8
Draft
max-charlamb wants to merge 5947 commits into
Draft
[cDAC] PR 1/5: Stack walk GC reference scanning and bug fixes#8max-charlamb wants to merge 5947 commits into
max-charlamb wants to merge 5947 commits into
Conversation
PR dotnet#124967 accidentally committed two lines with CRLF endings into a file that uses LF, causing git to perpetually report the file as modified on Windows (core.autocrlf=true). Renormalize to consistent LF endings. cc: @MihaZupan Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Teach redundant branch elimination to keep jump threading through PHI-based blocks when the PHI uses can be fully accounted for in the block and its immediate successors. Rewrite the affected successor SSA/VN uses, keep dominating-block threading conservative, and add focused regression coverage for the new PHI-based cases. Fix included here that was not in dotnet#126812: ensure that field uses of locals get the proper VN updates. Fixes dotnet#126976.
## Description This adds a daily scheduled agentic workflow that scans the `runtime-extra-platforms` https://dev.azure.com/dnceng-public/public/_build?definitionId=154 for Apple mobile (iOS, tvOS, MacCatalyst) and Android failures on `main`. ## What it does - **Daily scan**: queries the latest completed build, finds failed mobile jobs, reads failure logs - **Triage**: classifies failures as infrastructure (reports on tracking issues with machine details) or code (traces to recent commits) - **Fix**: opens draft PRs for code failures, caps at 2 PRs, 2 issues, 5 comments per run ## Files | File | Purpose | |---|---| | `.github/skills/mobile-platforms/SKILL.md` | Domain knowledge: CI pipeline structure, code paths, failure triage, platform gotchas | | `.github/workflows/mobile-scan.md` | Daily scan workflow (schedule trigger, write-access gated) | | `.github/workflows/mobile-scan.lock.yml` | Compiled lock file | ## Safety & permissions The workflow source (`.md`) declares **read-only** permissions (`contents: read`, `issues: read`, `pull-requests: read`). The agent job itself has no direct write access to the repository. All write operations (creating draft PRs, issues, and comments) go through the **safe-outputs** boundary, which runs in a separate job with its own scoped permissions. Safe-outputs enforces strict caps: | Output | Cap | Constraints | |---|---|---| | Draft PRs | max 2 | Title prefix `[mobile] `, labels `agentic-workflows`, protected files/paths fallback to issue | | Issues | max 2 | Labels `agentic-workflows`, `untriaged` | | Comments | max 5 | On existing issues/PRs only | Additional safeguards: - Only admins, maintainers, and contributors with write access can trigger via `workflow_dispatch` - External skill content (helix-investigation) is fetched pinned to a specific commit SHA, not a mutable branch - Log excerpts are sanitized before posting (no secrets, tokens, PII) - Concurrency group prevents overlapping runs - Network allowlist restricts outbound access to Azure DevOps, Helix, GitHub, and Helix blob storage only --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
cgroup code was being compiled and linked on macOS and FreeBSD even though cgroups are a Linux-specific mechanism. While this caused no runtime harm (functions returned 0/false due to missing `/sys/fs/cgroup`), the code was dead weight on those platforms. Fixes dotnet#99363 --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: jkotas <6668460+jkotas@users.noreply.github.com> Co-authored-by: Jan Kotas <jkotas@microsoft.com>
…ing (dotnet#127105) **The essence of the bug:** During decompression, a portion of compressed data ends exactly at the boundary of a 64 kb buffer, and the remaining bytes, not yet decompressed by the decoder, are waiting for the next portion, resulting in a exception. The buffer is physically full, and AvailableSpan returns an empty fragment, ``Span<byte>`` empty reading from the file into an empty Span returns 0 bytes read. **Solution:** Checks have been added to the main Read and ReadAsync loops. If AvailableLength is zero, we force a call to ``_buffer.EnsureAvailableSpace(1);.`` the bytes are shifted to the beginning of the array, the read is released, and the stream then reads new data. --------- Co-authored-by: Miha Zupan <mihazupan.zupan1@gmail.com>
…tnet#127156) When stepping next at the last line of Main, the debugger lands in the managed Environment.CallEntryPoint which stops the debuggee in a frame with no source info rather than the process simply exiting. Extend the existing IsInteropStub check in TriggerSingleStep to also recognize g_pEnvironmentCallEntryPointMethodDesc. When the single-step lands there, disable it and let the process exit naturally, matching the previous behavior when the return landed in native code. Found with internal VS debugger testing. --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: Jan Kotas <jkotas@microsoft.com>
Remove windows runs from the pipeline. Many suites fail with com related tests and windows is not really relevant as a target for now. We still run full runtime tests on windows. STJ.Tests - jit 2min - interpmode1 15min - interpmode3 >1.5h This also uncovers a new set of failures that we will need to address
…essStartInfo.Arguments` for the string+args overload (dotnet#127116) `StartAndForget_StartsProcessAndReturnsValidPid` was failing intermittently for `useProcessStartInfo: false` because the test passed `template.StartInfo.ArgumentList`, while `RemoteExecutor` populates `Arguments`. This could launch `dotnet` with effectively empty/incorrect arguments and exit early. fixes dotnet#127107 Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: adamsitnik <6011991+adamsitnik@users.noreply.github.com> Co-authored-by: jkotas <6668460+jkotas@users.noreply.github.com>
- Rewrite WasmImportThunk generation in terms of the TransitionBlock and the interpreter calling convention - Update the ArgIterator in crossgen2 to handle the interpreter calling convention, or at least something pretty close to it. - Move the adjustment of the stack pointer global to the `DelayLoad_MethodCall` function NOTE: We have not yet handled all of the variation between the interpreter and R2R calling conventions, but this is close enough to make good progress. --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This resolves dotnet#127138 In some cases we need to ensure the introduced node is explicitly marked as morphed since it may not be returning through `fgMorphHWIntrinsic`. This was a pre-existing issue, but one that only surfaced due to the fixed `IsVectorPerElementMask` check.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
If we partially jump-thread a block with PHIs, the remaining preds that target block may all bring in the same SSA def for some of the PHIs. If so, remove the PHIs and update the SSA/VN for the PHI uses in the block. In particular there may just be one ambiguous pred. Fixes dotnet#126703. --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…ser (dotnet#127173) `AssemblyNameParser.TryParseProcessorArchitecture` contained two identical `msil` arms in its switch expression. The second was unreachable dead code — the first arm always matched first. Fixes dotnet#127172 --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: jkotas <6668460+jkotas@users.noreply.github.com>
This should fix CI build and relinking, introduced in dotnet#126901 and masked by dotnet#90458 in build analysis
Implement cDAC DacDbi APIs: GetModuleData, IsModuleMapped --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
ObjectHandle is a strange IData in that it expects the address parameter to be the address field of the OBJECTHANDLE as opposed to the address of the structure like in every other IData. This is annoying because it means we have to first ReadPointer from the address of the ObjectHandle before we construct one, which means these fields have to be typed as pointers instead of TYPE(ObjectHandle). With this refactoring, the parameter to ObjectHandle is now the address of the ObjectHandle, and we can type ObjectHandle fields properly and do ReadDataField<ObjectHandle> where appropriate.
dotnet#126880) Change OSR functions for arm64, loongarch64 and riscv64 to start their prolog out by restoring the values of all callee saves that were saved by the tier0 function. This should make it possible to transition from tier0 to OSR without requiring any unwinding – instead it can be done with a simple jump. The end goal is to fix dotnet#120865 which is showing up in ASP.NET benchmarks. Also support saving patchpoint info produced by an altjit in the VM.
…nts (dotnet#127158) We do not restore these in the OSR methods so using these registers currently relies on the unwinder. We will have transitioning that does not use the unwinder soon so just disable using these registers. Since patchpoints only appear in tier0 methods it is not a big deal to avoid using these registers.
) Fixes test failure on Android platforms discovered in build [#1385862](https://dev.azure.com/dnceng-public/cbb18261-c48f-4abb-8651-8cdcb5474649/_build/results?buildId=1385862). ## Failure **Test**: `System.Net.Sockets.Tests.SocketBlockingModeTransitionTests.ConnectAsync_WithBuffer_Succeeds` **Helix job**: `0d1226c0-0bbd-4f97-9615-2de51177394c` **Work item**: `System.Net.Sockets.Tests` **Platform**: android-x64 (also affects other Android architectures) ### Console log excerpt ````text [FAIL] System.Net.Sockets.Tests.SocketBlockingModeTransitionTests.ConnectAsync_WithBuffer_Succeeds Assert.False() Failure Expected: False Actual: True at System.Net.Sockets.Tests.SocketBlockingModeTransitionTests.ConnectAsync_WithBuffer_Succeeds() ```` **Exit code**: 1 (TESTS_FAILED) ### Root cause The test verifies socket blocking mode transitions during async connect operations with TFO (TCP Fast Open). Android behaves like Apple platforms: the `sendto` syscall with `MSG_FASTOPEN` can complete both the connect and send in a single operation, leaving the socket in blocking mode even when the operation completes asynchronously. The test already accounts for Apple platforms at line 227 but was missing Android: ````csharp // Before: if (!completedAsync || PlatformDetection.IsApplePlatform) // After: if (!completedAsync || PlatformDetection.IsApplePlatform || PlatformDetection.IsAndroid) ```` ### Fix Add `|| PlatformDetection.IsAndroid` to the platform check that expects the socket to remain in blocking mode after TFO completes. ## Testing The test will pass on Android, iOS, tvOS, and MacCatalyst in the `runtime-extra-platforms` pipeline. Linux behavior remains unchanged (expects non-blocking socket when `completedAsync` is true). --- > [!NOTE] > This PR was created by GitHub Copilot after analyzing mobile platform CI failures in the runtime-extra-platforms pipeline. > [!NOTE] > <details> > <summary>🔒 Integrity filter blocked 1 item</summary> > > The following item were blocked because they don't meet the GitHub integrity level. > > - [dotnet#125825](dotnet#125825) `search_issues`: has lower integrity than agent requires. The agent cannot read data with integrity below "approved". > > To allow these resources, lower `min-integrity` in your GitHub frontmatter: > > ```yaml > tools: > github: > min-integrity: approved # merged | approved | unapproved | none > ``` > > </details> > Generated by [Mobile Platform Failure Scanner](https://github.com/dotnet/runtime/actions/runs/24653568615/agentic_workflow) · ● 3.5M · [◷](https://github.com/search?q=repo%3Adotnet%2Fruntime+%22gh-aw-workflow-id%3A+mobile-scan%22&type=pullrequests) <!-- gh-aw-agentic-workflow: Mobile Platform Failure Scanner, engine: copilot, model: claude-sonnet-4.5, id: 24653568615, workflow_id: mobile-scan, run: https://github.com/dotnet/runtime/actions/runs/24653568615 --> <!-- gh-aw-workflow-id: mobile-scan --> --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
…dotnet#126878) > [!NOTE] > This PR was created with assistance from GitHub Copilot. ## Summary Fixes the ConfigurationBinder source generator's diagnostic suppressor to correctly handle IL2026/IL3050 AOT warnings. Two issues are addressed: ### 1. Defensive fix for method-argument case (dotnet#94544) When `c.Get<MyOptions>()` is passed directly as a method argument (e.g. `Some.Method(c.Get<MyOptions>())`), `FindNode` could return an `ArgumentSyntax` instead of the inner `InvocationExpressionSyntax` when both share the same span. Added `getInnermostNodeForTie: true` to `FindNode` to resolve the tie correctly. Note: this was already inadvertently fixed by dotnet#110086 (which changed diagnostic locations from `InvocationExpression` to `MemberAccessExpression`), but the fix is still valuable as defense-in-depth. ### 2. Only suppress warnings for actually intercepted calls (dotnet#96643) The suppressor was suppressing IL2026/IL3050 for *all* ConfigurationBinder calls, even when the generator chose not to intercept them (e.g. unsupported types). Now the suppressor scans the generated `BindingExtensions.g.cs` for `[InterceptsLocation]` attributes and only suppresses warnings for call sites that were actually intercepted. This handles both v0 (file/line/column) and v1 (encoded data) interceptor formats. ### Tests - Added `Suppressor_SuppressesWarnings_WhenBindingCallIsMethodArgument` and `Suppressor_SuppressesWarnings_ForSimpleBindingCall` tests using the real `DynamicallyAccessedMembersAnalyzer` from ILLink. - Added `VerifySuppressedCallsMatchInterceptedCalls` helper that verifies suppressed and intercepted locations match exactly. Integrated into `VerifyAgainstBaselineUsingFile` and `VerifyThatSourceIsGenerated` so all baseline tests automatically get this coverage. Fixes dotnet#94544 Fixes dotnet#96643
…pt (dotnet#126992) ILTrim was dropping `PropertyDefinition`/`EventDefinition` metadata rows even when accessor methods were reachable, and `AddPropertyMap`/`AddEventMap` used the input `TypeDefinitionHandle` instead of the output handle — producing wrong type associations when types are removed during trimming.
Fixes dotnet#126604. When we're doing dataflow analysis of MakeGenericXXX calls, we run constraint validation to ensure we don't precompile something invalid. However, because most reflection analysis within the compiler happens with canonical types, we can end up in a situation where a constraint check is necessary but all we have are canonical types. Constraint checking and CanCastTo logic was treating this a `class __Canon : object { }` case, but this is not that.
…ple mobile CoreCLR (dotnet#127063) ## Description Test if `ActiveIssue` can be removed from System.Runtime tests. Also clean up `tests.proj` exclusions. --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
> [!NOTE] > This is a codeflow update. It may contain both source code changes from > [the VMR](https://github.com/dotnet/dotnet) > as well as dependency updates. Learn more [here](https://github.com/dotnet/dotnet/tree/main/docs/Codeflow-PRs.md). This pull request brings the following source code changes [marker]: <> (Begin:f7901f87-9f24-40d6-9bc1-564863937237) ## From https://github.com/dotnet/dotnet - **Subscription**: [f7901f87-9f24-40d6-9bc1-564863937237](https://maestro.dot.net/subscriptions?search=f7901f87-9f24-40d6-9bc1-564863937237) - **Build**: [20260411.2](https://dev.azure.com/dnceng/internal/_build/results?buildId=2948814) ([311032](https://maestro.dot.net/channel/8298/github:dotnet:dotnet/build/311032)) - **Date Produced**: April 20, 2026 4:55:58 AM UTC - **Commit**: [36afe73557f5f93cd7bc827cb644a3ff018eca0b](dotnet/dotnet@36afe73) - **Commit Diff**: [5bed449...36afe73](dotnet/dotnet@5bed449...36afe73) - **Branch**: [main](https://github.com/dotnet/dotnet/tree/main) **Updated Dependencies** - From [5.7.0-1.26210.111 to 5.7.0-1.26211.102][1] - Microsoft.CodeAnalysis - Microsoft.CodeAnalysis.Analyzers - Microsoft.CodeAnalysis.CSharp - Microsoft.Net.Compilers.Toolset - From [11.0.100-preview.4.26210.111 to 11.0.100-preview.4.26211.102][1] - Microsoft.CodeAnalysis.NetAnalyzers - Microsoft.DotNet.ApiCompat.Task - Microsoft.NET.Workload.Emscripten.Current.Manifest-11.0.100.Transport - From [11.0.0-beta.26210.111 to 11.0.0-beta.26211.102][1] - Microsoft.DotNet.Arcade.Sdk - Microsoft.DotNet.Build.Tasks.Archives - Microsoft.DotNet.Build.Tasks.Feed - Microsoft.DotNet.Build.Tasks.Installers - Microsoft.DotNet.Build.Tasks.Packaging - Microsoft.DotNet.Build.Tasks.TargetFramework - Microsoft.DotNet.Build.Tasks.Templating - Microsoft.DotNet.Build.Tasks.Workloads - Microsoft.DotNet.CodeAnalysis - Microsoft.DotNet.GenAPI - Microsoft.DotNet.GenFacades - Microsoft.DotNet.Helix.Sdk - Microsoft.DotNet.PackageTesting - Microsoft.DotNet.RemoteExecutor - Microsoft.DotNet.SharedFramework.Sdk - Microsoft.DotNet.XliffTasks - Microsoft.DotNet.XUnitExtensions - From [0.11.5-preview.26210.111 to 0.11.5-preview.26211.102][1] - Microsoft.DotNet.Cecil - From [3.2.2-beta.26210.111 to 3.2.2-beta.26211.102][1] - Microsoft.DotNet.XUnitAssert - From [2.9.3-beta.26210.111 to 2.9.3-beta.26211.102][1] - Microsoft.DotNet.XUnitConsoleRunner - From [11.0.0-preview.4.26210.111 to 11.0.0-preview.4.26211.102][1] - Microsoft.NET.Sdk.IL - Microsoft.NETCore.App.Ref - Microsoft.NETCore.ILAsm - runtime.native.System.IO.Ports - System.Reflection.Metadata - System.Reflection.MetadataLoadContext - System.Text.Json - From [7.6.0-rc.21111 to 7.6.0-rc.21202][1] - NuGet.Frameworks - NuGet.Packaging - NuGet.ProjectModel - NuGet.Versioning - From [3.0.0-preview.4.26210.111 to 3.0.0-preview.4.26211.102][1] - System.CommandLine [marker]: <> (End:f7901f87-9f24-40d6-9bc1-564863937237) [1]: dotnet/dotnet@5bed449...36afe73 [marker]: <> (Start:Footer:CodeFlow PR) ## Associated changes in source repos - dotnet/command-line-api@0b48ccb...d3de878 - dotnet/efcore@695b5ad...ebc5a87 - dotnet/roslyn@b99bcbb...e3a102f <details> <summary>Diff the source with this PR branch</summary> ```bash darc vmr diff --name-only https://github.com/dotnet/dotnet:36afe73557f5f93cd7bc827cb644a3ff018eca0b..https://github.com/dotnet/runtime:darc-main-6932152a-bf16-4444-a659-a69205112834 ``` </details> [marker]: <> (End:Footer:CodeFlow PR) --------- Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
…Silicon (dotnet#127355) ## Problem On macOS Apple Silicon (observed on macOS 15), compressed self-contained single-file apps intermittently hit `AccessViolationException` crashes. With the repro provided in the issue, the failure rate was roughly 75% in a local run. `FlatImageLayout::LoadImageByCopyingParts` allocates the image region with `MEM_RESERVE_EXECUTABLE` (which maps to `MAP_JIT` on macOS) as `PAGE_READWRITE`, copies in all section bytes, then promotes executable sections to `PAGE_EXECUTE_READWRITE` via a second `mprotect`. On Apple Silicon, this `RW → RWX` transition on MAP_JIT memory has been observed to intermittently succeed at the API level but leave pages non-executable at the kernel level, producing the sporadic AVs. ## Fix On Apple Silicon (`HOST_OSX && HOST_ARM64`), avoid the unreliable transition: reserve the whole image region as `PAGE_NOACCESS` up front, then commit each section directly with its final runtime protection (`PAGE_EXECUTE_READWRITE` for exec, `PAGE_READWRITE` otherwise), copying executable content under `PAL_JitWriteProtect`. The `PROT_NONE → RWX` direction via a fresh commit is reliable; the problematic `RW → RWX` transition no longer occurs. Read-only sections are still downgraded from `PAGE_READWRITE` to `PAGE_READONLY` after the copy, which is a W-removing transition and is not implicated in the original bug. The non-Apple-Silicon code path is unchanged. ## Testing New test: `AppHost.Bundle.Tests.AppLaunch.SelfContained_Compressed_SpawnsChildren` (OSX-only). Adds a `launch_self` option to the `HelloWorld` test asset that spawns 5 copies of itself in parallel, and asserts the parent runs to completion. Local validation on Apple Silicon: - Without fix: parent crash with `AccessViolationException` in ~74% of trials at N=5 children (rises to ~98% at N≥12). - With fix: 0 failures across 50+ trials at N=5. --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…et#127369) Several `TokenBasedNode` subclasses in ILTrim were not calling `CustomAttributeNode.AddDependenciesDueToCustomAttributes`, causing custom attributes on those metadata tables to be silently dropped during trimming.
1. Agent is sometimes ignoring the result of the version calculation script - make it more clear how to handle results. 2. Comment was duplicating issue body. Remove this. 3. Tag the PR's assignees to get attention. --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…tnet#127539) More code can be replaced with safe in this assembly, but that requires work in the jit side. Current change produces improvements: [diffs](MihuBot/runtime-utils#1870) --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This is a fix for an issue that came up in dotnet#126778, and is probably easiest to explain with a motivating example. Consider the following case, where NOMOVE is a gentree operation we aren't allowed to move. ``` t2 = ... NOMOVE OP t3 = ... OP t0 = ... NOMOVE OP t1 = ... OP * t3 (arg1) * t2 (arg2) * t1 (arg3) * t0 (target) CALL ``` The stackifier will first introduce a store to put `t0` after `t1`: ``` t2 = ... NOMOVE OP t3 = ... OP t0 = ... OP +** STORE_LCL_VAR tmp0 t1 = ... OP t0 = LCL_VAR tmp0 * t3 (arg1) * t2 (arg2) * t1 (arg3) * t0 (call target) CALL ``` And then recursively stackify the new STORE to tmp0, since it is a dataflow root. *The stackifier then marks tmp0 as free here, since it IS free in linear data flow order*. Then, when the next operands to the call are stackified, the stackifier introduces a temporary again, but reuses t0 because we freed it. ``` t2 = ... OP +** STORE_LCL_VAR tmp0 t3 = ... OP t2 = LCL_VAR tmp0 t0 = ... OP +** STORE_LCL_VAR tmp0 t1 = ... OP t0 = LCL_VAR tmp0 * t3 * t2 * t1 * t0 (target) CALL ``` This produces invalid LIR; there is a store to tmp0 before one of its reads (t2) is consumed. The simplest fix is to not release temporaries for reuse until all operands of a root tree have been processed. This PR adds a free list of temps which is recycled after each root gen tree has been processed, so we won't end up with any interference between temporaries while processing gentree ops which share a parent node. --------- Co-authored-by: SingleAccretion <62474226+SingleAccretion@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Initially cherry-picked commit from dotnet#126662; This PR: - Adds explicit handling in lowering for managed calls using the PEP calling convention to pass the additional PEP parameter. - Removes some dead code around handling of `WellKnownArg::R2RIndireictionCell` from wasm code gen. - Adds fixes for helper call codegen to account for the extra level of indirection needed to load a helper call target from a PEP (Portable Entrypoint). ## Lowering Transformation Details The lowering transformation introduces a temp local (call it `pep`) to hold the PEP, which we then add to a managed call as a final parameter with associated ABI info. We then rewrite the control expr of the call to be `*pep`. This ensures that, conceptually, any call with an entrypoint of access type `PVALUE` will be lowered to something roughly like the following, in C notation: ``` void* pep = *(void**)(<value>); (*(void**)pep)(arg0, arg1, ..., argN, pep) ``` --------- Co-authored-by: David Wrighton <davidwr@microsoft.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: adamsitnik <6011991+adamsitnik@users.noreply.github.com> Co-authored-by: Adam Sitnik <adam.sitnik@gmail.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…xception (dotnet#127592) Fix a Windows crash with x64 debugging with Interpreter breakpoints on CET-enabled hardware. Interpreter breakpoints are synthetic software callbacks, not vectored exception handler callbacks. We were passing in Passing `fIsVEH=TRUE` (the default) but this caused `SendSetThreadContextNeeded` to fire unconditionally for every interpreter breakpoint, resulting in a crash. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This updates OSR docs to account for dotnet#127074, dotnet#127158 and dotnet#127213 (not yet merged). Also address some comment feedback from dotnet#127074.
Add two safe value-numbering algebraic identities for non-overflow integer types: - `(a - x) + x == a` (and commutative variants) - `a - (a - x) == x` [Diffs](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1400847&view=ms.vss-build-web.run-extensions-tab) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
`ApplicationContext::GetApplicationName()` and its backing field `m_applicationName` were dead code — declared and defined but never called anywhere in the binder. Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: elinor-fung <47805090+elinor-fung@users.noreply.github.com>
…dotnet#124738) If-conversion phase now produces the same IR for these two cases: ```cs bool First(int tMinLeft, int tMinRight) { bool leftCloser = false; if (tMinLeft < tMinRight) { leftCloser = true; } return leftCloser; } bool Second(int tMinLeft, int tMinRight) { bool leftCloser; if (tMinLeft < tMinRight) { leftCloser = true; } else { leftCloser = false; } return leftCloser; } ``` The last unconditional store (`leftCloser = false`) is substituted into the SELECT which enables further optimization. Specifically it fixes dotnet#124713.
## Description This PR enables System.Private.Xml tests on Apple mobile CoreCLR. The local tests succeeded without failures. --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Closes dotnet#126395. ## Summary Adds four new public `JsonSerializer.SerializeAsyncEnumerable<TValue>` overloads (`Stream` and `PipeWriter`, each with `JsonSerializerOptions` and `JsonTypeInfo<TValue>` variants) that serialize an `IAsyncEnumerable<TValue>` either as a root-level JSON array (default) or as a [JSON Lines (JSONL)](https://jsonlines.org/) document when `topLevelValues: true` — mirroring the existing `DeserializeAsyncEnumerable` shape. Approved API: dotnet#126395 (comment) ```csharp namespace System.Text.Json; public static partial class JsonSerializer { public static Task SerializeAsyncEnumerable<TValue>( Stream utf8Json, IAsyncEnumerable<TValue> value, bool topLevelValues = false, JsonSerializerOptions? options = null, CancellationToken cancellationToken = default); public static Task SerializeAsyncEnumerable<TValue>( Stream utf8Json, IAsyncEnumerable<TValue> value, JsonTypeInfo<TValue> jsonTypeInfo, bool topLevelValues = false, CancellationToken cancellationToken = default); public static Task SerializeAsyncEnumerable<TValue>( PipeWriter utf8Json, IAsyncEnumerable<TValue> value, bool topLevelValues = false, JsonSerializerOptions? options = null, CancellationToken cancellationToken = default); public static Task SerializeAsyncEnumerable<TValue>( PipeWriter utf8Json, IAsyncEnumerable<TValue> value, JsonTypeInfo<TValue> jsonTypeInfo, bool topLevelValues = false, CancellationToken cancellationToken = default); } ``` ## API-review feedback addressed 1. **Canonical `\n` line terminator** — emits `(byte)`'`\n`'` between (and after) each value regardless of `JsonSerializerOptions.NewLine`. 2. **`WriteIndented` ignored** — new `JsonSerializerOptions.GetWriterOptionsForJsonLines()` produces writer options with default (i.e. `Indented = false`), so each value occupies one line. 3. **Comprehensive JSONL deserialization tests** — `[Theory]` covering trailing/no-trailing LF, single value, empty doc, whitespace-only, line-terminator-only, lenient `\r\n`, lenient extra whitespace, plus heterogeneous JSON value kinds (null, bool, number, string, array, object). 4. **Both `Serialize-` and `DeserializeAsyncEnumerable` doc comments** explicitly cite https://jsonlines.org/. ## Implementation notes - `GetOrAddIAsyncEnumerableTypeInfoForSerialize<T>` synthesizes `JsonTypeInfo<IAsyncEnumerable<T>>` from the supplied element `JsonTypeInfo<T>` and caches it on the element. Both Stream and PipeWriter overloads use this for array-mode serialization so source-gen contexts that haven`'t registered `IAsyncEnumerable<T>` continue to work — mirroring the existing `GetOrAddListTypeInfoForArrayMode` pattern used by deserialization. - Each JSONL item is serialized to a `Utf8JsonWriter`, followed by a single `\n` byte and a flush; the writer is reused via the parameterless `Reset()` between items. - The `PipeWriter` overload honors `FlushResult.IsCompleted` (early break) and `FlushResult.IsCanceled` (throws `OperationCanceledException`). - Writer disposal follows the simpler pattern used by sync `Serialize(Stream)` and the fast-path async `SerializeAsync(PipeWriter)` (plain `using`/`try-finally`); we don`'t catch+`Reset` because that defense is incomplete (it only narrows the leak window for in-`_memory` bytes; bytes already `Advance`d via `Grow()` cannot be rolled back through the `IBufferWriter` contract). ## Test coverage (462 net new + existing) Serialize: - JSONL output for objects, primitives, empty sequences, and the default JSON-array mode; round-trips via Stream and PipeWriter at counts 0, 1, 5, 100. - Canonical `\n` terminator regardless of `JsonSerializerOptions.NewLine` (`\n`, `\r\n`). - `JsonSerializerOptions.WriteIndented` ignored. - `JsonSerializerOptions.Encoder` propagated. - Null-arg validation for both Stream and PipeWriter overloads. - Strings containing raw newlines / control chars round-trip via JSON escaping. - `null` elements written as `null`. - Polymorphic items with `[JsonDerivedType]`. - Items larger than `DefaultBufferSize` (exercises `Utf8JsonWriter.Grow()`). - PipeWriter `FlushResult.IsCompleted` early-break path (custom `PipeWriter` for determinism). - Mid-iteration `CancellationToken` cancellation; pre-cancelled tokens; async-enumerator disposal on success and on cancellation. - Partial-item failure: prior items fully written; behavior documented for both Stream and PipeWriter. - `JsonTypeInfo<TValue>` overload works with element-only metadata. - `JsonSerializerOptions` overload works with element-only metadata (regression for source-gen contexts). Deserialize (existing API, JSONL spec coverage): - All valid JSONL shapes per https://jsonlines.org/ (Theory with 9 inputs). - Heterogeneous JSON value types (null, bool, number, string, array, object). - Buffer-boundary stress (sizes 1, 8, 64, 4096). - Stream → PipeReader round-trip. Verified: - `dotnet test System.Text.Json.Tests` — **452** AsyncEnumerable tests pass on net11.0 and net481. - `dotnet test System.Text.Json.SourceGeneration.Roslyn4.4.Tests` — **135** AsyncEnumerable tests pass on net11.0 and net481. - Full library test suite passes with no regressions. --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…ns (dotnet#126309) Fixes dotnet#90986, Part of dotnet#127279 ### Summary `ImmutableHashSet<T>.SetEquals` always creates a new intermediate `HashSet<T>` for the `other` collection, leading to avoidable allocations and GC pressure, especially for large datasets ### Optimization Logic * **O(1) Pre-Scan**: Immediately returns `false` if `other` is an `ICollection` with a smaller `Count`, avoiding any overhead. * **Fast-Path Pattern Matching**: Detects `ImmutableHashSet<T>` and `HashSet<T>` to bypass intermediate allocations. * **Comparer Guard**: Validates `EqualityComparer` compatibility before triggering fast paths to ensure logical consistency. * **Short-Circuit Validation**: Re-validates `Count` within specialized paths for an immediate exit before $O(n)$ enumeration. * **Reverse-Lookup Strategy**: An architectural shift where the ImmutableHashSet (The Source) iterates and queries the other collection if was Hashset. This leverages the O(1) lookup of the HashSet<T> instead of the O(log N) lookup of the immutable tree. * **Zero-Allocation Execution**: Direct iteration over compatible collections, eliminating the costly `new HashSet<T>(other)` fallback. * **Deferred fallback**: Reserves the expensive allocation solely for general `IEnumerable` types. <details> <summary><b>Click to expand Benchmark Source Code</b></summary> ```csharp using BenchmarkDotNet.Attributes; using BenchmarkDotNet.Order; using BenchmarkDotNet.Running; using System; using System.Collections.Generic; using System.Collections.Immutable; using System.Linq; namespace ImmutableHashSetBenchmarks { [MemoryDiagnoser] [Orderer(SummaryOrderPolicy.FastestToSlowest)] [RankColumn] public class ImmutableHashSetSetEqualsBenchmark_Int { private ImmutableHashSet<int> _sourceSet = null!; private ImmutableHashSet<int> _immutableHashSetEqual = null!; private HashSet<int> _bclHashSetEqual = null!; private List<int> _listEqual = null!; private IEnumerable<int> _linqSelectEqual = null!; private int[] _arrayEqual = null!; private List<int> _listLastDiff = null!; private List<int> _listSmaller = null!; private ImmutableHashSet<int> _immutableLarger = null!; private int[] _smallerArray = null!; private HashSet<int> _smallerHashSetDiffComparer = null!; // Worst case: same count, last element different private ImmutableHashSet<int> _immutableHashSetLastDiff = null!; private HashSet<int> _bclHashSetLastDiff = null!; private List<int> _listWithDuplicates = null!; private List<int> _listWithDuplicatesMatch = null!; // Different comparers (fallback path) private HashSet<int> _bclHashSetDiffComparer = null!; // Count mismatch early exit private ImmutableHashSet<int> _immutableHashSetSmaller = null!; private HashSet<int> _bclHashSetSmaller = null!; // Lazy enumerable for worst case private IEnumerable<int> _lazyEnumerableLastDiff = null!; [Params(100000)] public int Size { get; set; } [GlobalSetup] public void Setup() { var elements = Enumerable.Range(0, Size).ToList(); var elementsWithLastDiff = Enumerable.Range(0, Size - 1).Concat(new[] { Size + 1000 }).ToList(); var smallerElements = Enumerable.Range(0, Size / 2).ToList(); var duplicates = Enumerable.Repeat(1, Size).ToList(); var smallerList = new List<int>(); for(int i = 0; i < Size - 1; i++) smallerList.Add(i); _sourceSet = ImmutableHashSet.CreateRange(elements); _immutableHashSetEqual = ImmutableHashSet.CreateRange(elements); _bclHashSetEqual = new HashSet<int>(elements); _listEqual = elements; _linqSelectEqual = elements.Select(x => x); // Lazy LINQ enumerable _arrayEqual = elements.ToArray(); _immutableHashSetLastDiff = ImmutableHashSet.CreateRange(elementsWithLastDiff); _bclHashSetLastDiff = new HashSet<int>(elementsWithLastDiff); _listLastDiff = elementsWithLastDiff; _bclHashSetDiffComparer = new HashSet<int>(elements, new ReverseComparer<int>()); _immutableHashSetSmaller = ImmutableHashSet.CreateRange(smallerElements); _bclHashSetSmaller = new HashSet<int>(smallerElements); _lazyEnumerableLastDiff = elementsWithLastDiff.Select(x => x); _immutableLarger = ImmutableHashSet.CreateRange(elements.Concat(new[] { -1 })); _listWithDuplicates = duplicates; _listWithDuplicatesMatch = elements.Concat(elements).ToList(); // Matches source but with duplicates _listSmaller = smallerList; _smallerArray = Enumerable.Range(0, Size - 1).ToArray(); _smallerHashSetDiffComparer = new HashSet<int>(_listSmaller, new ReverseComparer<int>()); } #region Fast Path: Same Type and Comparer (Optimized) [Benchmark(Description = "ImmutableHashSet (Match - Same Comparer)")] public bool Case_ImmutableHashSet_Match() => _sourceSet.SetEquals(_immutableHashSetEqual); [Benchmark(Description = "BCL HashSet (Match - Same Comparer)")] public bool Case_BclHashSet_Match() => _sourceSet.SetEquals(_bclHashSetEqual); [Benchmark(Description = "ImmutableHashSet (Mismatch - Same Count)")] public bool Case_ImmutableHashSet_LastDiff() => _sourceSet.SetEquals(_immutableHashSetLastDiff); [Benchmark(Description = "Case 04: BCL HashSet (Mismatch - Same Count)")] public bool Case_BclHashSet_LastDiff() => _sourceSet.SetEquals(_bclHashSetLastDiff); #endregion #region Early Exit: Count Mismatch [Benchmark(Description = "ImmutableHashSet (Smaller Count)")] public bool Case_ImmutableHashSet_SmallerCount() => _sourceSet.SetEquals(_immutableHashSetSmaller); [Benchmark(Description = "BCL HashSet (Smaller Count)")] public bool Case_BclHashSet_SmallerCount() => _sourceSet.SetEquals(_bclHashSetSmaller); [Benchmark(Description = "Array (Smaller Count)")] public bool Case_SmallerCollection_EarlyExit() { return _sourceSet.SetEquals(_smallerArray); } #endregion #region Fallback Path: Different Comparer [Benchmark(Description = "HashSet (Different Comparer)")] public bool Case_HashSet_DifferentComparer() => _sourceSet.SetEquals(_bclHashSetDiffComparer); [Benchmark(Description = "HashSet (Smaller Count - Different Comparer)")] public bool Case_HashSet_SmallerCount_DiffComparer() => _sourceSet.SetEquals(_smallerHashSetDiffComparer); #endregion #region Fallback Path: Non-Set Collections (IEnumerable/ICollection) [Benchmark(Description = "List (Match - Fallback)")] public bool Case_List_Match() => _sourceSet.SetEquals(_listEqual); [Benchmark(Description = "LINQ (Mismatch - Lazy IEnumerable)")] public bool Case_LazyEnumerable_LastDiff() => _sourceSet.SetEquals(_lazyEnumerableLastDiff); [Benchmark(Description = "LINQ (Match - Lazy IEnumerable)")] public bool Case_LazyEnumerable_Match() => _sourceSet.SetEquals(_linqSelectEqual); [Benchmark(Description = "List (Last Diff - Fallback)")] public bool Case_List_LastDiff() => _sourceSet.SetEquals(_listLastDiff); [Benchmark(Description = "Array (Match - Fallback)")] public bool Case_Array_Match() => _sourceSet.SetEquals(_arrayEqual); [Benchmark(Description = "ImmutableHashSet (Larger Count)")] public bool Case_LargerCount() => _sourceSet.SetEquals(_immutableLarger); #endregion #region Handling Duplicates (Fallback Path) [Benchmark(Description = "List with Duplicates (Mismatch)")] public bool Case_List_Duplicates_Mismatch() => _sourceSet.SetEquals(_listWithDuplicates); [Benchmark(Description = "List with Duplicates (Match)")] public bool Case_List_Duplicates_Match() => _sourceSet.SetEquals(_listWithDuplicatesMatch); #endregion } public class ReverseComparer<T> : IEqualityComparer<T> where T : IComparable<T> { public bool Equals(T? x, T? y) { if (x is null && y is null) return true; if (x is null || y is null) return false; return x.CompareTo(y) == 0; } public int GetHashCode(T? obj) { return obj?.GetHashCode() ?? 0; } } public class Program { public static void Main(string[] args) { BenchmarkRunner.Run<ImmutableHashSetSetEqualsBenchmark_Int>(); } } } ``` </details> <details> <summary><b>Click to expand Benchmark Results</b></summary> ### Benchmark Results (Before Optimization) | Method | Size | Mean | Error | StdDev | Rank | Gen0 | Gen1 | Gen2 | Allocated | |:--- |:---:|---:|---:|---:|---:|---:|---:|---:|---:| | 'BCL HashSet (Smaller Count)' | 100000 | 313.8 us | 6.01 us | 6.43 us | 1 | 15.6250 | 15.6250 | 15.6250 | 818.33 KB | | 'Array (Smaller Count)' | 100000 | 647.9 us | 11.20 us | 11.50 us | 2 | 26.3672 | 26.3672 | 26.3672 | 1697.7 KB | | 'List with Duplicates (Mismatch)' | 100000 | 954.1 us | 18.77 us | 41.60 us | 3 | 31.2500 | 31.2500 | 31.2500 | 1697.77 KB | | ' HashSet (Smaller Count - Different Comparer)' | 100000 | 1,449.3 us | 28.65 us | 74.46 us | 4 | 41.0156 | 41.0156 | 41.0156 | 1697.8 KB | | ' ImmutableHashSet (Smaller Count)' | 100000 | 4,733.2 us | 74.18 us | 69.39 us | 5 | 23.4375 | 23.4375 | 23.4375 | 818.58 KB | | ' BCL HashSet (Match - Same Comparer)' | 100000 | 7,084.0 us | 65.02 us | 57.64 us | 6 | 54.6875 | 54.6875 | 54.6875 | 1697.9 KB | | 'Array (Match - Fallback)' | 100000 | 7,821.7 us | 30.71 us | 27.23 us | 7 | 46.8750 | 46.8750 | 46.8750 | 1697.86 KB | | 'List (Match - Fallback)' | 100000 | 8,428.4 us | 30.82 us | 28.83 us | 8 | 46.8750 | 46.8750 | 46.8750 | 1697.9 KB | | 'BCL HashSet (Mismatch - Same Count)' | 100000 | 8,636.3 us | 52.37 us | 46.42 us | 8 | 46.8750 | 46.8750 | 46.8750 | 1697.86 KB | | 'List (Last Diff - Fallback)' | 100000 | 9,172.5 us | 35.85 us | 33.54 us | 9 | 46.8750 | 46.8750 | 46.8750 | 1697.9 KB | | 'List with Duplicates (Match)' | 100000 | 9,310.2 us | 128.11 us | 119.83 us | 9 | 109.3750 | 109.3750 | 109.3750 | 3521.42 KB | | ' ImmutableHashSet (Larger Count)' | 100000 | 9,477.3 us | 141.55 us | 125.48 us | 9 | 46.8750 | 46.8750 | 46.8750 | 1697.89 KB | | ' HashSet (Different Comparer)' | 100000 | 9,839.2 us | 99.14 us | 87.88 us | 9 | 46.8750 | 46.8750 | 46.8750 | 1697.79 KB | | 'LINQ (Mismatch - Lazy IEnumerable)' | 100000 | 11,274.4 us | 63.77 us | 56.53 us | 10 | 296.8750 | 156.2500 | 156.2500 | 4717.23 KB | | 'LINQ (Match - Lazy IEnumerable)' | 100000 | 11,341.5 us | 69.37 us | 61.49 us | 10 | 296.8750 | 156.2500 | 156.2500 | 4717.23 KB | | 'ImmutableHashSet (Mismatch - Same Count)' | 100000 | 17,015.5 us | 170.03 us | 150.73 us | 11 | 31.2500 | 31.2500 | 31.2500 | 1697.88 KB | | 'ImmutableHashSet (Match - Same Comparer)' | 100000 | 17,410.2 us | 334.48 us | 312.87 us | 11 | 31.2500 | 31.2500 | 31.2500 | 1697.87 KB | --- ### Benchmark Results (After Optimization) | Method | Size | Mean | Error | StdDev | Rank | Gen0 | Gen1 | Gen2 | Allocated | |:--- |:--- |---:|---:|---:|:---:|---:|---:|---:|---:| | 'ImmutableHashSet (Smaller Count)' | 100000 | 2.300 ns | 0.0478 ns | 0.0447 ns | 1 | - | - | - | - | | 'ImmutableHashSet (Larger Count)' | 100000 | 2.328 ns | 0.0650 ns | 0.0576 ns | 1 | - | - | - | - | | 'BCL HashSet (Smaller Count)' | 100000 | 2.595 ns | 0.0524 ns | 0.0491 ns | 2 | - | - | - | - | | 'HashSet (Smaller Count - Different Comparer)' | 100000 | 2.644 ns | 0.0464 ns | 0.0411 ns | 2 | - | - | - | - | | 'Array (Smaller Count)' | 100000 | 2.711 ns | 0.0568 ns | 0.0504 ns | 2 | - | - | - | - | | 'List with Duplicates (Mismatch)' | 100000 | 794,876.698 ns | 15,781.0452 ns | 35,941.4284 ns | 3 | 31.2500 | 31.2500 | 31.2500 | 1738498 B | | 'List (Last Diff - Fallback)' | 100000 | 4,722,211.915 ns | 55,323.2393 ns | 51,749.3924 ns | 4 | 54.6875 | 54.6875 | 54.6875 | 1738698 B | | 'List (Match - Fallback)' | 100000 | 4,778,905.952 ns | 33,894.4095 ns | 28,303.3670 ns | 4 | 54.6875 | 54.6875 | 54.6875 | 1738688 B | | 'List with Duplicates (Match)' | 100000 | 5,517,422.167 ns | 110,159.9473 ns | 171,505.7803 ns | 5 | 93.7500 | 93.7500 | 93.7500 | 3605853 B | | 'BCL HashSet (Match - Same Comparer)' | 100000 | 5,576,721.937 ns | 45,754.5403 ns | 38,207.1134 ns | 5 | - | - | - | - | | 'Case 04: BCL HashSet (Mismatch - Same Count)' | 100000 | 5,640,651.163 ns | 64,526.5199 ns | 60,358.1468 ns | 5 | - | - | - | - | | 'LINQ (Mismatch - Lazy IEnumerable)' | 100000 | 6,406,188.227 ns | 132,260.6999 ns | 379,480.7689 ns | 6 | 281.2500 | 140.6250 | 140.6250 | 4830429 B | | 'LINQ (Match - Lazy IEnumerable)' | 100000 | 6,784,385.648 ns | 135,159.5121 ns | 290,945.1304 ns | 7 | 250.0000 | 125.0000 | 125.0000 | 4830439 B | | 'Array (Match - Fallback)' | 100000 | 6,812,793.701 ns | 40,732.0373 ns | 36,107.8901 ns | 7 | 54.6875 | 54.6875 | 54.6875 | 1738653 B | | 'HashSet (Different Comparer)' | 100000 | 7,497,254.730 ns | 80,339.5419 ns | 75,149.6574 ns | 8 | 62.5000 | 62.5000 | 62.5000 | 1738753 B | | 'ImmutableHashSet (Mismatch - Same Count)' | 100000 | 12,946,989.847 ns | 94,279.9494 ns | 83,576.7194 ns | 9 | - | - | - | - | | 'ImmutableHashSet (Match - Same Comparer)' | 100000 | 13,615,905.022 ns | 57,544.4439 ns | 48,052.2169 ns | 10 | - | - | - | - | </details> ### Performance Analysis Summary (100,000 Elements) | Case / Method | Before (ns) | After (ns) | Speedup Ratio | Memory Improvement | |:---|---:|---:|---:|:---| | **ImmutableHashSet (Larger Count)** | 9,477,300 | 2.328 | **~4,071,005x** | **Zero Alloc** | | **ImmutableHashSet (Smaller Count)** | 4,733,200 | 2.300 | **~2,057,913x** | **Zero Alloc** | | **HashSet (Smaller - Diff Comparer)** | 1,449,300 | 2.644 | **~548,146x** | **Zero Alloc** | | **Array (Smaller Count)** | 647,900 | 2.711 | **~238,989x** | **Zero Alloc** | | **BCL HashSet (Smaller Count)** | 313,800 | 2.595 | **~120,924x** | **Zero Alloc** | | **HashSet (Different Comparer)** | 9,839,200 | 7,497,254 | **1.31x** | Stable (~1.7 MB) | | **LINQ (Match/Mismatch)** | 11,341,500 | 6,406,188 | **1.77x** | Stable (~4.8 MB) | | **BCL HashSet (Mismatch - Same Count)**| 8,636,300 | 5,640,651 | **1.53x** | **Zero Alloc** | | **ImmutableHashSet (Match)** | 17,410,200 | 13,615,905 | **1.28x** | **Zero Alloc** | | **ImmutableHashSet (Mismatch)** | 17,015,500 | 12,946,989 | **1.31x** | **Zero Alloc** | | **List (Match/Diff - Fallback)** | 9,172,500 | 4,722,211 | **1.94x** | Stable (~1.7 MB) | | **BCL HashSet (Match - Same Comp)** | 7,084,000 | 5,576,721 | **1.27x** | **Zero Alloc** | | **List (Duplicates - Mismatch)** | 954,100 | 794,876 | **1.20x** | Stable (~1.7 MB) | | **List (Duplicates - Match)** | 9,310,200 | 5,517,422 | **1.69x** | Stable (~3.6 MB) | | **Array (Match - Fallback)** | 7,821,700 | 6,812,793 | **1.15x** | Stable (~1.7 MB) |
…ng (dotnet#127419) ## Summary Implements continuation pretty-printing in the cDAC, mirroring `AsyncContinuationsManager::PrintContinuationName` from `asynccontinuations.h`, and adds a new `GetGCDescSeries` API to the `RuntimeTypeSystem` contract. Fixes the WebApp3 test failure seen in recent runtime-diagnostics legs such as this: https://dev.azure.com/dnceng-public/public/_build/results?buildId=1395576 The `GetGCDescSeries` API accepts an optional `numComponents` parameter (defaulting to `0` for non-array types) and handles both regular (positive `NumSeries`) and value-class repeating (negative `NumSeries`) GCDesc layouts. For value-class GCDesc, the outer loop iterates `numComponents` times — callers must pass the actual element count to enumerate pointer runs across array elements. > [!NOTE] > This PR was created with the assistance of GitHub Copilot (AI-generated content). --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: rcj1 <77995559+rcj1@users.noreply.github.com> Co-authored-by: rcj1 <rachel.jarvi@gmail.com> Co-authored-by: Noah Falk <noahfalk@users.noreply.github.com>
Implement GC reference scanning for stub/transition frames and fix stack walker state machine bugs: - PromoteCallerStack/PromoteCallerStackUsingGCRefMap for transition frames - GCRefMap decoder for ReadyToRun import section resolution - FindGCRefMap with FindReadyToRunModule fallback - SOSDacImpl.GetStackReferences using cDAC contract - Fix IsFirst preserved for skipped frames - Fix skipped frame handling moved to UpdateState - GCInfoDecoder goto removal (ReportUntrackedAndSucceed local function) - RequiresInstArg, IsAsyncMethod, HasRetBuffArg on IRuntimeTypeSystem - ExceptionInfo ClauseForCatch fields for catch handler detection - Data descriptor additions for frame types and TransitionBlock layout Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Use ex.HResult instead of E_FAIL in GetStackReferences catch block - Remove ZapModule references from StackWalk.md documentation - Replace magic 0x11 with (byte)SignatureTypeKind.ValueType - Remove StressTests csproj reference from cdac.slnx (PR5 only) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…SDacImpl error handling - Update GCInfo.md: EnumerateLiveSlots returns IReadOnlyList<LiveSlot> with GcSlotEnumerationOptions (replaces CodeManagerFlags/LiveSlotCallback) - Add type definitions for LiveSlot, InterruptibleRange, GcSlotEnumerationOptions - Fix SOSDacImpl.GetStackReferences: throw ArgumentException instead of premature return so #if DEBUG validation always runs Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Extract all GC root scanning methods into a dedicated GcScanner class: - EnumGcRefsForManagedFrame (managed frame via GCInfo) - GcScanRoots (frame-based dispatch) - FindGCRefMap (R2R import section resolution) - PromoteCallerStack/PromoteCallerStackUsingGCRefMap (signature/GCRefMap scanning) - ScanDynamicHelperFrame (flag-based scanning) FrameIterator is now purely frame iteration (314 lines, down from 747). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
b8c28e6 to
0fee23e
Compare
- Merge ArgumentRegisters and ArgumentRegistersOffset into single ArgumentRegisters field on all platforms in datadescriptor.inc - TransitionBlock: ArgumentRegisters and FirstGCRefMapSlot now store computed addresses (TargetPointer) instead of raw offsets - GcScanner: AddressFromGCRefMapPos returns TargetPointer directly - ARMFrameHandler: simplified now that ArgumentRegisters is non-nullable - RuntimeTypeSystem.md: add RequiresInstArg and IsAsyncMethod pseudocode - RequiresInstArg uses MethodDescFlags.Static (0x0080) instead of metadata Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Renamed to EvalUsesHijack to match the native data descriptor. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Fix ReadStackPop to use RuntimeInfoArchitecture.X86 instead of PointerSize == 4 (matches native #ifdef TARGET_X86) - Remove StressTests csproj exclude (belongs in PR 5) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
max-charlamb
pushed a commit
that referenced
this pull request
Jun 19, 2026
This PR adds lane construction and composition APIs approved in dotnet#122557, and the corresponding JIT intrinsics. The JIT now recognizes the new vector APIs and expands them using existing SIMD nodes. The managed implementation allows decomposition through smaller vector widths when wider hardware support is unavailable. The xarch lowering uses fixed shuffle forms where profitable: - `vpbroadcast*` for sequence and alternating construction - vshufps and vpunpck* for 128-bit concat/zip/unzip patterns - full-width unpack plus `vperm2i128` for 256-bit zip/unzip - EVEX shuffle/permute forms for 512-bit operations when AVX512 is available - fixed immediate shuffles for reverse The ARM64 lowering avoids table-lookup forms for small fixed concat/reverse operations and uses direct element moves where applicable, such as `ins` and `rev64`. `CreateCauchySequence` has been removed as it doesn't make sense at all. And `SignSequence` has been moved to an extension property as we only want to expose it for signed numbers. Codegen: <details> <summary>Vector128</summary> ```asm ; Vector128.CreateGeometricSequence<int>(initial, 3) ; Emitting BLENDED_CODE for x64 + VEX + EVEX on Windows G_M55419_IG01: ;; offset=0x0000 G_M55419_IG02: ;; offset=0x0000 vpbroadcastd xmm0, edx vpmulld xmm0, xmm0, xmmword ptr [reloc @rwd00] vmovups xmmword ptr [rcx], xmm0 mov rax, rcx G_M55419_IG03: ;; offset=0x0016 ret RWD00 dq 0000000300000001h, 0000001B00000009h ; Total bytes of code 23 ; Vector128.CreateAlternatingSequence<int>(even, odd) ; Emitting BLENDED_CODE for x64 + VEX + EVEX on Windows G_M23632_IG01: ;; offset=0x0000 G_M23632_IG02: ;; offset=0x0000 vpbroadcastd xmm0, edx vpbroadcastd xmm1, r8d vpunpckldq xmm0, xmm0, xmm1 vmovups xmmword ptr [rcx], xmm0 mov rax, rcx G_M23632_IG03: ;; offset=0x0017 ret ; Total bytes of code 24 ; Vector128<int>.SignSequence ; Emitting BLENDED_CODE for x64 + VEX + EVEX on Windows G_M37526_IG01: ;; offset=0x0000 G_M37526_IG02: ;; offset=0x0000 vmovddup xmm0, qword ptr [reloc @rwd00] vmovups xmmword ptr [rcx], xmm0 mov rax, rcx G_M37526_IG03: ;; offset=0x000F ret RWD00 dq FFFFFFFF00000001h ; Total bytes of code 16 ; Vector128.CreateHarmonicSequence<float>(start, step) ; Emitting BLENDED_CODE for x64 + VEX + EVEX on Windows G_M24925_IG01: ;; offset=0x0000 G_M24925_IG02: ;; offset=0x0000 vbroadcastss xmm0, xmm2 vmulps xmm0, xmm0, xmmword ptr [reloc @rwd00] vbroadcastss xmm1, xmm1 vaddps xmm0, xmm1, xmm0 vbroadcastss xmm1, dword ptr [reloc @RWD16] vdivps xmm0, xmm1, xmm0 vmovups xmmword ptr [rcx], xmm0 mov rax, rcx G_M24925_IG03: ;; offset=0x002A ret RWD00 dq 3F80000000000000h, 4040000040000000h RWD16 dd 3F800000h ; 1 ; Total bytes of code 43 ; Vector128.CreateGeometricSequence<float>(initial, 3.0f) ; Emitting BLENDED_CODE for x64 + VEX + EVEX on Windows G_M52564_IG01: ;; offset=0x0000 G_M52564_IG02: ;; offset=0x0000 vbroadcastss xmm0, xmm1 vmulps xmm0, xmm0, xmmword ptr [reloc @rwd00] vmovups xmmword ptr [rcx], xmm0 mov rax, rcx G_M52564_IG03: ;; offset=0x0014 ret RWD00 dq 404000003F800000h, 41D8000041100000h ; Total bytes of code 21 ; Vector128.ConcatLowerLower<int>(left, right) ; Emitting BLENDED_CODE for x64 + VEX + EVEX on Windows G_M47101_IG01: ;; offset=0x0000 G_M47101_IG02: ;; offset=0x0000 vmovups xmm0, xmmword ptr [rdx] vshufps xmm0, xmm0, xmmword ptr [r8], 68 vmovups xmmword ptr [rcx], xmm0 mov rax, rcx G_M47101_IG03: ;; offset=0x0011 ret ; Total bytes of code 18 ; Vector128.ConcatLowerUpper<int>(left, right) ; Emitting BLENDED_CODE for x64 + VEX + EVEX on Windows G_M48932_IG01: ;; offset=0x0000 G_M48932_IG02: ;; offset=0x0000 vmovups xmm0, xmmword ptr [rdx] vshufps xmm0, xmm0, xmmword ptr [r8], -28 vmovups xmmword ptr [rcx], xmm0 mov rax, rcx G_M48932_IG03: ;; offset=0x0011 ret ; Total bytes of code 18 ; Vector128.ConcatUpperLower<int>(left, right) ; Emitting BLENDED_CODE for x64 + VEX + EVEX on Windows G_M24196_IG01: ;; offset=0x0000 G_M24196_IG02: ;; offset=0x0000 vmovups xmm0, xmmword ptr [rdx] vshufps xmm0, xmm0, xmmword ptr [r8], 78 vmovups xmmword ptr [rcx], xmm0 mov rax, rcx G_M24196_IG03: ;; offset=0x0011 ret ; Total bytes of code 18 ; Vector128.ConcatUpperUpper<int>(left, right) ; Emitting BLENDED_CODE for x64 + VEX + EVEX on Windows G_M45405_IG01: ;; offset=0x0000 G_M45405_IG02: ;; offset=0x0000 vmovups xmm0, xmmword ptr [rdx] vshufps xmm0, xmm0, xmmword ptr [r8], -18 vmovups xmmword ptr [rcx], xmm0 mov rax, rcx G_M45405_IG03: ;; offset=0x0011 ret ; Total bytes of code 18 ; Vector128.ZipLower<int>(left, right) ; Emitting BLENDED_CODE for x64 + VEX + EVEX on Windows G_M10057_IG01: ;; offset=0x0000 G_M10057_IG02: ;; offset=0x0000 vmovups xmm0, xmmword ptr [rdx] vpunpckldq xmm0, xmm0, xmmword ptr [r8] vmovups xmmword ptr [rcx], xmm0 mov rax, rcx G_M10057_IG03: ;; offset=0x0010 ret ; Total bytes of code 17 ; Vector128.ZipUpper<int>(left, right) ; Emitting BLENDED_CODE for x64 + VEX + EVEX on Windows G_M48936_IG01: ;; offset=0x0000 G_M48936_IG02: ;; offset=0x0000 vmovups xmm0, xmmword ptr [rdx] vpunpckhdq xmm0, xmm0, xmmword ptr [r8] vmovups xmmword ptr [rcx], xmm0 mov rax, rcx G_M48936_IG03: ;; offset=0x0010 ret ; Total bytes of code 17 ; Vector128.Zip<int>(left, right) ; Emitting BLENDED_CODE for x64 + VEX + EVEX on Windows G_M32727_IG01: ;; offset=0x0000 G_M32727_IG02: ;; offset=0x0000 vmovups xmm0, xmmword ptr [rdx] vmovups xmm1, xmmword ptr [r8] vpunpckldq xmm2, xmm0, xmm1 vpunpckhdq xmm0, xmm0, xmm1 vmovups xmmword ptr [rcx], xmm2 vmovups xmmword ptr [rcx+0x10], xmm0 mov rax, rcx G_M32727_IG03: ;; offset=0x001D ret ; Total bytes of code 30 ; Vector128.UnzipEven<int>(left, right) ; Emitting BLENDED_CODE for x64 + VEX + EVEX on Windows G_M32745_IG01: ;; offset=0x0000 G_M32745_IG02: ;; offset=0x0000 vmovups xmm0, xmmword ptr [rdx] vshufps xmm0, xmm0, xmmword ptr [r8], -120 vmovups xmmword ptr [rcx], xmm0 mov rax, rcx G_M32745_IG03: ;; offset=0x0011 ret ; Total bytes of code 18 ; Vector128.UnzipOdd<int>(left, right) ; Emitting BLENDED_CODE for x64 + VEX + EVEX on Windows G_M32638_IG01: ;; offset=0x0000 G_M32638_IG02: ;; offset=0x0000 vmovups xmm0, xmmword ptr [rdx] vshufps xmm0, xmm0, xmmword ptr [r8], -35 vmovups xmmword ptr [rcx], xmm0 mov rax, rcx G_M32638_IG03: ;; offset=0x0011 ret ; Total bytes of code 18 ; Vector128.Unzip<int>(left, right) ; Emitting BLENDED_CODE for x64 + VEX + EVEX on Windows G_M7116_IG01: ;; offset=0x0000 G_M7116_IG02: ;; offset=0x0000 vmovups xmm0, xmmword ptr [rdx] vmovups xmm1, xmmword ptr [r8] vshufps xmm2, xmm0, xmm1, -120 vshufps xmm0, xmm0, xmm1, -35 vmovups xmmword ptr [rcx], xmm2 vmovups xmmword ptr [rcx+0x10], xmm0 mov rax, rcx G_M7116_IG03: ;; offset=0x001F ret ; Total bytes of code 32 ; Vector128.Reverse<int>(vector) ; Emitting BLENDED_CODE for x64 + VEX + EVEX on Windows G_M36184_IG01: ;; offset=0x0000 G_M36184_IG02: ;; offset=0x0000 vpshufd xmm0, xmmword ptr [rdx], 27 vmovups xmmword ptr [rcx], xmm0 mov rax, rcx G_M36184_IG03: ;; offset=0x000C ret ; Total bytes of code 13 ``` </details> <details> <summary>Vector256</summary> ```asm ; Vector256.CreateGeometricSequence<int>(initial, 3) ; Emitting BLENDED_CODE for x64 + VEX + EVEX on Windows G_M59643_IG01: ;; offset=0x0000 G_M59643_IG02: ;; offset=0x0000 vpbroadcastd ymm0, edx vpmulld ymm0, ymm0, ymmword ptr [reloc @rwd00] vmovups ymmword ptr [rcx], ymm0 mov rax, rcx G_M59643_IG03: ;; offset=0x0016 vzeroupper ret RWD00 dq 0000000300000001h, 0000001B00000009h, 000000F300000051h, 0000088B000002D9h ; Total bytes of code 26 ; Vector256.CreateAlternatingSequence<int>(even, odd) ; Emitting BLENDED_CODE for x64 + VEX + EVEX on Windows G_M40720_IG01: ;; offset=0x0000 G_M40720_IG02: ;; offset=0x0000 vpbroadcastd ymm0, edx vmovups ymm1, ymmword ptr [reloc @rwd00] vpbroadcastd ymm2, r8d vpermt2d ymm2, ymm1, ymm0 vmovups ymmword ptr [rcx], ymm2 mov rax, rcx G_M40720_IG03: ;; offset=0x0021 vzeroupper ret RWD00 dq 0000000000000008h, 0000000100000009h, 000000020000000Ah, 000000030000000Bh ; Total bytes of code 37 ; Vector256<int>.SignSequence ; Emitting BLENDED_CODE for x64 + VEX + EVEX on Windows G_M7766_IG01: ;; offset=0x0000 G_M7766_IG02: ;; offset=0x0000 vbroadcastsd ymm0, qword ptr [reloc @rwd00] vmovups ymmword ptr [rcx], ymm0 mov rax, rcx G_M7766_IG03: ;; offset=0x0010 vzeroupper ret RWD00 dq FFFFFFFF00000001h ; Total bytes of code 20 ; Vector256.CreateHarmonicSequence<float>(start, step) ; Emitting BLENDED_CODE for x64 + VEX + EVEX on Windows G_M59741_IG01: ;; offset=0x0000 G_M59741_IG02: ;; offset=0x0000 vbroadcastss ymm0, ymm2 vmulps ymm0, ymm0, ymmword ptr [reloc @rwd00] vbroadcastss ymm1, ymm1 vaddps ymm0, ymm1, ymm0 vbroadcastss ymm1, dword ptr [reloc @RWD32] vdivps ymm0, ymm1, ymm0 vmovups ymmword ptr [rcx], ymm0 mov rax, rcx G_M59741_IG03: ;; offset=0x002A vzeroupper ret RWD00 dq 3F80000000000000h, 4040000040000000h, 40A0000040800000h, 40E0000040C00000h RWD32 dd 3F800000h ; 1 ; Total bytes of code 46 ; Vector256.CreateGeometricSequence<float>(initial, 3.0f) ; Emitting BLENDED_CODE for x64 + VEX + EVEX on Windows G_M42068_IG01: ;; offset=0x0000 G_M42068_IG02: ;; offset=0x0000 vbroadcastss ymm0, ymm1 vmulps ymm0, ymm0, ymmword ptr [reloc @rwd00] vmovups ymmword ptr [rcx], ymm0 mov rax, rcx G_M42068_IG03: ;; offset=0x0014 vzeroupper ret RWD00 dq 404000003F800000h, 41D8000041100000h, 4373000042A20000h, 4508B00044364000h ; Total bytes of code 24 ; Vector256.ConcatLowerLower<int>(left, right) ; Emitting BLENDED_CODE for x64 + VEX + EVEX on Windows G_M46973_IG01: ;; offset=0x0000 G_M46973_IG02: ;; offset=0x0000 vmovups ymm0, ymmword ptr [rdx] vmovdqu xmm1, xmmword ptr [r8] vinserti128 ymm0, ymm0, xmm1 vmovups ymmword ptr [rcx], ymm0 mov rax, rcx G_M46973_IG03: ;; offset=0x0016 vzeroupper ret ; Total bytes of code 26 ; Vector256.ConcatLowerUpper<int>(left, right) ; Emitting BLENDED_CODE for x64 + VEX + EVEX on Windows G_M9060_IG01: ;; offset=0x0000 G_M9060_IG02: ;; offset=0x0000 vmovups ymm0, ymmword ptr [rdx] vmovups ymm1, ymmword ptr [r8] vextracti128 xmm1, ymm1 vinserti128 ymm0, ymm0, xmm1 vmovups ymmword ptr [rcx], ymm0 mov rax, rcx G_M9060_IG03: ;; offset=0x001C vzeroupper ret ; Total bytes of code 32 ; Vector256.ConcatUpperLower<int>(left, right) ; Emitting BLENDED_CODE for x64 + VEX + EVEX on Windows G_M57796_IG01: ;; offset=0x0000 G_M57796_IG02: ;; offset=0x0000 vmovups ymm0, ymmword ptr [rdx] vextracti128 xmm0, ymm0 vmovdqu xmm1, xmmword ptr [r8] vinserti128 ymm0, ymm0, xmm1 vmovups ymmword ptr [rcx], ymm0 mov rax, rcx G_M57796_IG03: ;; offset=0x001C vzeroupper ret ; Total bytes of code 32 ; Vector256.ConcatUpperUpper<int>(left, right) ; Emitting BLENDED_CODE for x64 + VEX + EVEX on Windows G_M7901_IG01: ;; offset=0x0000 G_M7901_IG02: ;; offset=0x0000 vmovups ymm0, ymmword ptr [rdx] vextracti128 xmm0, ymm0 vmovups ymm1, ymmword ptr [r8] vinserti128 ymm0, ymm1, xmm0 vmovups ymmword ptr [rcx], ymm0 mov rax, rcx G_M7901_IG03: ;; offset=0x001C vzeroupper ret ; Total bytes of code 32 ; Vector256.ZipLower<int>(left, right) ; Emitting BLENDED_CODE for x64 + VEX + EVEX on Windows G_M61705_IG01: ;; offset=0x0000 G_M61705_IG02: ;; offset=0x0000 vmovups ymm0, ymmword ptr [rdx] vmovups ymm1, ymmword ptr [reloc @rwd00] vpermt2d ymm0, ymm1, ymmword ptr [r8] vmovups ymmword ptr [rcx], ymm0 mov rax, rcx G_M61705_IG03: ;; offset=0x0019 vzeroupper ret RWD00 dq 0000000800000000h, 0000000900000001h, 0000000A00000002h, 0000000B00000003h ; Total bytes of code 29 ; Vector256.ZipUpper<int>(left, right) ; Emitting BLENDED_CODE for x64 + VEX + EVEX on Windows G_M38056_IG01: ;; offset=0x0000 G_M38056_IG02: ;; offset=0x0000 vmovups ymm0, ymmword ptr [rdx] vmovups ymm1, ymmword ptr [reloc @rwd00] vpermt2d ymm0, ymm1, ymmword ptr [r8] vmovups ymmword ptr [rcx], ymm0 mov rax, rcx G_M38056_IG03: ;; offset=0x0019 vzeroupper ret RWD00 dq 0000000C00000004h, 0000000D00000005h, 0000000E00000006h, 0000000F00000007h ; Total bytes of code 29 ; Vector256.Zip<int>(left, right) ; Emitting BLENDED_CODE for x64 + VEX + EVEX on Windows G_M24445_IG01: ;; offset=0x0000 G_M24445_IG02: ;; offset=0x0000 vmovups ymm0, ymmword ptr [rdx] vmovups ymm1, ymmword ptr [r8] vpunpckldq ymm2, ymm0, ymm1 vpunpckhdq ymm0, ymm0, ymm1 vperm2i128 ymm1, ymm2, ymm0, 32 vperm2i128 ymm0, ymm2, ymm0, 49 vmovups ymmword ptr [rcx], ymm1 vmovups ymmword ptr [rcx+0x20], ymm0 mov rax, rcx G_M24445_IG03: ;; offset=0x0029 vzeroupper ret ; Total bytes of code 45 ; Vector256.UnzipEven<int>(left, right) ; Emitting BLENDED_CODE for x64 + VEX + EVEX on Windows G_M4905_IG01: ;; offset=0x0000 G_M4905_IG02: ;; offset=0x0000 vmovups ymm0, ymmword ptr [rdx] vmovups ymm1, ymmword ptr [reloc @rwd00] vpermt2d ymm0, ymm1, ymmword ptr [r8] vmovups ymmword ptr [rcx], ymm0 mov rax, rcx G_M4905_IG03: ;; offset=0x0019 vzeroupper ret RWD00 dq 0000000200000000h, 0000000600000004h, 0000000A00000008h, 0000000E0000000Ch ; Total bytes of code 29 ; Vector256.UnzipOdd<int>(left, right) ; Emitting BLENDED_CODE for x64 + VEX + EVEX on Windows G_M54526_IG01: ;; offset=0x0000 G_M54526_IG02: ;; offset=0x0000 vmovups ymm0, ymmword ptr [rdx] vmovups ymm1, ymmword ptr [reloc @rwd00] vpermt2d ymm0, ymm1, ymmword ptr [r8] vmovups ymmword ptr [rcx], ymm0 mov rax, rcx G_M54526_IG03: ;; offset=0x0019 vzeroupper ret RWD00 dq 0000000300000001h, 0000000700000005h, 0000000B00000009h, 0000000F0000000Dh ; Total bytes of code 29 ; Vector256.Unzip<int>(left, right) ; Emitting BLENDED_CODE for x64 + VEX + EVEX on Windows G_M52326_IG01: ;; offset=0x0000 G_M52326_IG02: ;; offset=0x0000 vpshufd ymm0, ymmword ptr [rdx], -40 vpermq ymm0, ymm0, -40 vpshufd ymm1, ymmword ptr [r8], -40 vpermq ymm1, ymm1, -40 vperm2i128 ymm2, ymm0, ymm1, 32 vperm2i128 ymm0, ymm0, ymm1, 49 vmovups ymmword ptr [rcx], ymm2 vmovups ymmword ptr [rcx+0x20], ymm0 mov rax, rcx G_M52326_IG03: ;; offset=0x002F vzeroupper ret ; Total bytes of code 51 ; Vector256.Reverse<int>(vector) ; Emitting BLENDED_CODE for x64 + VEX + EVEX on Windows G_M23794_IG01: ;; offset=0x0000 G_M23794_IG02: ;; offset=0x0000 vmovups ymm0, ymmword ptr [reloc @rwd00] vpermd ymm0, ymm0, ymmword ptr [rdx] vmovups ymmword ptr [rcx], ymm0 mov rax, rcx G_M23794_IG03: ;; offset=0x0014 vzeroupper ret RWD00 dq 0000000600000007h, 0000000400000005h, 0000000200000003h, 0000000000000001h ; Total bytes of code 24 ``` </details> <details> <summary>Vector512</summary> ```asm ; Vector512.CreateGeometricSequence<int>(initial, 3) ; Emitting BLENDED_CODE for x64 + VEX + EVEX on Windows G_M55451_IG01: ;; offset=0x0000 G_M55451_IG02: ;; offset=0x0000 vpbroadcastd zmm0, edx vpmulld zmm0, zmm0, zmmword ptr [reloc @rwd00] vmovups zmmword ptr [rcx], zmm0 mov rax, rcx G_M55451_IG03: ;; offset=0x0019 vzeroupper ret RWD00 dq 0000000300000001h, 0000001B00000009h, 000000F300000051h, 0000088B000002D9h, 00004CE3000019A1h, 0002B3FB0000E6A9h, 001853D300081BF1h, 00DAF26B0048FB79h ; Total bytes of code 29 ; Vector512.CreateAlternatingSequence<int>(even, odd) ; Emitting BLENDED_CODE for x64 + VEX + EVEX on Windows G_M560_IG01: ;; offset=0x0000 G_M560_IG02: ;; offset=0x0000 vpbroadcastd zmm0, edx vmovups zmm1, zmmword ptr [reloc @rwd00] vpbroadcastd zmm2, r8d vpermt2d zmm2, zmm1, zmm0 vmovups zmmword ptr [rcx], zmm2 mov rax, rcx G_M560_IG03: ;; offset=0x0025 vzeroupper ret RWD00 dq 0000000000000010h, 0000000100000011h, 0000000200000012h, 0000000300000013h, 0000000400000014h, 0000000500000015h, 0000000600000016h, 0000000700000017h ; Total bytes of code 41 ; Vector512<int>.SignSequence ; Emitting BLENDED_CODE for x64 + VEX + EVEX on Windows G_M63542_IG01: ;; offset=0x0000 G_M63542_IG02: ;; offset=0x0000 vbroadcastsd zmm0, qword ptr [reloc @rwd00] vmovups zmmword ptr [rcx], zmm0 mov rax, rcx G_M63542_IG03: ;; offset=0x0013 vzeroupper ret RWD00 dq FFFFFFFF00000001h ; Total bytes of code 23 ; Vector512.CreateHarmonicSequence<float>(start, step) ; Emitting BLENDED_CODE for x64 + VEX + EVEX on Windows G_M41245_IG01: ;; offset=0x0000 G_M41245_IG02: ;; offset=0x0000 vbroadcastss zmm0, zmm2 vmulps zmm0, zmm0, zmmword ptr [reloc @rwd00] vbroadcastss zmm1, zmm1 vaddps zmm0, zmm1, zmm0 vbroadcastss zmm1, dword ptr [reloc @RWD64] vdivps zmm0, zmm1, zmm0 vmovups zmmword ptr [rcx], zmm0 mov rax, rcx G_M41245_IG03: ;; offset=0x0035 vzeroupper ret RWD00 dq 3F80000000000000h, 4040000040000000h, 40A0000040800000h, 40E0000040C00000h, 4110000041000000h, 4130000041200000h, 4150000041400000h, 4170000041600000h RWD64 dd 3F800000h ; 1 ; Total bytes of code 57 ; Vector512.CreateGeometricSequence<float>(initial, 3.0f) ; Emitting BLENDED_CODE for x64 + VEX + EVEX on Windows G_M35892_IG01: ;; offset=0x0000 G_M35892_IG02: ;; offset=0x0000 vbroadcastss zmm0, zmm1 vmulps zmm0, zmm0, zmmword ptr [reloc @rwd00] vmovups zmmword ptr [rcx], zmm0 mov rax, rcx G_M35892_IG03: ;; offset=0x0019 vzeroupper ret RWD00 dq 404000003F800000h, 41D8000041100000h, 4373000042A20000h, 4508B00044364000h, 4699C60045CD0800h, 482CFEC04766A900h, 49C29E984901BF10h, 4B5AF26B4A91F6F2h ; Total bytes of code 29 ; Vector512.ConcatLowerLower<int>(left, right) ; Emitting BLENDED_CODE for x64 + VEX + EVEX on Windows G_M13789_IG01: ;; offset=0x0000 G_M13789_IG02: ;; offset=0x0000 vmovups zmm0, zmmword ptr [rdx] vmovdqu ymm1, ymmword ptr [r8] vinserti32x8 zmm0, zmm0, ymm1, 1 vmovups zmmword ptr [rcx], zmm0 mov rax, rcx G_M13789_IG03: ;; offset=0x001B vzeroupper ret ; Total bytes of code 31 ; Vector512.ConcatLowerUpper<int>(left, right) ; Emitting BLENDED_CODE for x64 + VEX + EVEX on Windows G_M36420_IG01: ;; offset=0x0000 G_M36420_IG02: ;; offset=0x0000 vmovups zmm0, zmmword ptr [rdx] vmovups zmm1, zmmword ptr [r8] vextracti32x8 ymm1, zmm1, 1 vinserti32x8 zmm0, zmm0, ymm1, 1 vmovups zmmword ptr [rcx], zmm0 mov rax, rcx G_M36420_IG03: ;; offset=0x0023 vzeroupper ret ; Total bytes of code 39 ; Vector512.ConcatUpperLower<int>(left, right) ; Emitting BLENDED_CODE for x64 + VEX + EVEX on Windows G_M56164_IG01: ;; offset=0x0000 G_M56164_IG02: ;; offset=0x0000 vmovups zmm0, zmmword ptr [rdx] vextracti32x8 ymm0, zmm0, 1 vmovdqu ymm1, ymmword ptr [r8] vinserti32x8 zmm0, zmm0, ymm1, 1 vmovups zmmword ptr [rcx], zmm0 mov rax, rcx G_M56164_IG03: ;; offset=0x0022 vzeroupper ret ; Total bytes of code 38 ; Vector512.ConcatUpperUpper<int>(left, right) ; Emitting BLENDED_CODE for x64 + VEX + EVEX on Windows G_M13821_IG01: ;; offset=0x0000 G_M13821_IG02: ;; offset=0x0000 vmovups zmm0, zmmword ptr [rdx] vextracti32x8 ymm0, zmm0, 1 vmovups zmm1, zmmword ptr [r8] vinserti32x8 zmm0, zmm1, ymm0, 0 vmovups zmmword ptr [rcx], zmm0 mov rax, rcx G_M13821_IG03: ;; offset=0x0023 vzeroupper ret ; Total bytes of code 39 ; Vector512.ZipLower<int>(left, right) ; Emitting BLENDED_CODE for x64 + VEX + EVEX on Windows G_M59881_IG01: ;; offset=0x0000 G_M59881_IG02: ;; offset=0x0000 vmovups zmm0, zmmword ptr [rdx] vmovups zmm1, zmmword ptr [reloc @rwd00] vpermt2d zmm0, zmm1, zmmword ptr [r8] vmovups zmmword ptr [rcx], zmm0 mov rax, rcx G_M59881_IG03: ;; offset=0x001F vzeroupper ret RWD00 dq 0000001000000000h, 0000001100000001h, 0000001200000002h, 0000001300000003h, 0000001400000004h, 0000001500000005h, 0000001600000006h, 0000001700000007h ; Total bytes of code 35 ; Vector512.ZipUpper<int>(left, right) ; Emitting BLENDED_CODE for x64 + VEX + EVEX on Windows G_M10568_IG01: ;; offset=0x0000 G_M10568_IG02: ;; offset=0x0000 vmovups zmm0, zmmword ptr [rdx] vmovups zmm1, zmmword ptr [reloc @rwd00] vpermt2d zmm0, zmm1, zmmword ptr [r8] vmovups zmmword ptr [rcx], zmm0 mov rax, rcx G_M10568_IG03: ;; offset=0x001F vzeroupper ret RWD00 dq 0000001800000008h, 0000001900000009h, 0000001A0000000Ah, 0000001B0000000Bh, 0000001C0000000Ch, 0000001D0000000Dh, 0000001E0000000Eh, 0000001F0000000Fh ; Total bytes of code 35 ; Vector512.Zip<int>(left, right) ; Emitting BLENDED_CODE for x64 + VEX + EVEX on Windows G_M59130_IG01: ;; offset=0x0000 G_M59130_IG02: ;; offset=0x0000 vmovups zmm0, zmmword ptr [rdx] vmovups zmm1, zmmword ptr [r8] vpunpckhdq zmm2, zmm0, zmm1 vpunpckldq zmm0, zmm0, zmm1 vshufi32x4 zmm1, zmm0, zmm2, 68 vshufi32x4 zmm1, zmm1, zmm1, -40 vshufi32x4 zmm0, zmm0, zmm2, -18 vshufi32x4 zmm0, zmm0, zmm0, -40 vmovups zmmword ptr [rcx], zmm1 vmovups zmmword ptr [rcx+0x40], zmm0 mov rax, rcx G_M59130_IG03: ;; offset=0x0044 vzeroupper ret ; Total bytes of code 72 ; Vector512.UnzipEven<int>(left, right) ; Emitting BLENDED_CODE for x64 + VEX + EVEX on Windows G_M30057_IG01: ;; offset=0x0000 G_M30057_IG02: ;; offset=0x0000 vmovups zmm0, zmmword ptr [rdx] vmovups zmm1, zmmword ptr [reloc @rwd00] vpermt2d zmm0, zmm1, zmmword ptr [r8] vmovups zmmword ptr [rcx], zmm0 mov rax, rcx G_M30057_IG03: ;; offset=0x001F vzeroupper ret RWD00 dq 0000000200000000h, 0000000600000004h, 0000000A00000008h, 0000000E0000000Ch, 0000001200000010h, 0000001600000014h, 0000001A00000018h, 0000001E0000001Ch ; Total bytes of code 35 ; Vector512.UnzipOdd<int>(left, right) ; Emitting BLENDED_CODE for x64 + VEX + EVEX on Windows G_M65310_IG01: ;; offset=0x0000 G_M65310_IG02: ;; offset=0x0000 vmovups zmm0, zmmword ptr [rdx] vmovups zmm1, zmmword ptr [reloc @rwd00] vpermt2d zmm0, zmm1, zmmword ptr [r8] vmovups zmmword ptr [rcx], zmm0 mov rax, rcx G_M65310_IG03: ;; offset=0x001F vzeroupper ret RWD00 dq 0000000300000001h, 0000000700000005h, 0000000B00000009h, 0000000F0000000Dh, 0000001300000011h, 0000001700000015h, 0000001B00000019h, 0000001F0000001Dh ; Total bytes of code 35 ; Vector512.Unzip<int>(left, right) ; Emitting BLENDED_CODE for x64 + VEX + EVEX on Windows G_M1377_IG01: ;; offset=0x0000 G_M1377_IG02: ;; offset=0x0000 vmovups zmm0, zmmword ptr [rdx] vmovups zmm1, zmmword ptr [reloc @rwd00] vmovups zmm2, zmmword ptr [r8] vmovaps zmm3, zmm2 vpermt2d zmm3, zmm1, zmm0 vmovups zmm1, zmmword ptr [reloc @RWD64] vpermt2d zmm2, zmm1, zmm0 vmovups zmmword ptr [rcx], zmm2 vmovups zmmword ptr [rcx+0x40], zmm3 mov rax, rcx G_M1377_IG03: ;; offset=0x0042 vzeroupper ret RWD00 dq 0000001300000011h, 0000001700000015h, 0000001B00000019h, 0000001F0000001Dh, 0000000300000001h, 0000000700000005h, 0000000B00000009h, 0000000F0000000Dh RWD64 dq 0000001200000010h, 0000001600000014h, 0000001A00000018h, 0000001E0000001Ch, 0000000200000000h, 0000000600000004h, 0000000A00000008h, 0000000E0000000Ch ; Total bytes of code 70 ; Vector512.Reverse<int>(vector) ; Emitting BLENDED_CODE for x64 + VEX + EVEX on Windows G_M34517_IG01: ;; offset=0x0000 G_M34517_IG02: ;; offset=0x0000 vmovups zmm0, zmmword ptr [reloc @rwd00] vpermd zmm0, zmm0, zmmword ptr [rdx] vmovups zmmword ptr [rcx], zmm0 mov rax, rcx G_M34517_IG03: ;; offset=0x0019 vzeroupper ret RWD00 dq 0000000E0000000Fh, 0000000C0000000Dh, 0000000A0000000Bh, 0000000800000009h, 0000000600000007h, 0000000400000005h, 0000000200000003h, 0000000000000001h ; Total bytes of code 29 ``` </details> <details> <summary>ARM64</summary> ```asm ; Vector64.CreateGeometricSequence<int>(initial, 3) ; Emitting BLENDED_CODE for arm64 on Windows G_M6971_IG01: ;; offset=0x0000 stp fp, lr, [sp, #-0x10]! mov fp, sp G_M6971_IG02: ;; offset=0x0008 dup v0.2s, w0 ldr d16, [@rwd00] mul v0.2s, v0.2s, v16.2s G_M6971_IG03: ;; offset=0x0014 ldp fp, lr, [sp], #0x10 ret lr RWD00 dq 0000000300000001h ; Total bytes of code 28 ; Vector64.CreateAlternatingSequence<int>(even, odd) ; Emitting BLENDED_CODE for arm64 on Windows G_M10160_IG01: ;; offset=0x0000 stp fp, lr, [sp, #-0x10]! mov fp, sp G_M10160_IG02: ;; offset=0x0008 dup v0.2s, w0 dup v16.2s, w1 zip1 v0.2s, v0.2s, v16.2s G_M10160_IG03: ;; offset=0x0014 ldp fp, lr, [sp], #0x10 ret lr ; Total bytes of code 28 ; Vector64<int>.SignSequence ; Emitting BLENDED_CODE for arm64 on Windows G_M46198_IG01: ;; offset=0x0000 stp fp, lr, [sp, #-0x10]! mov fp, sp G_M46198_IG02: ;; offset=0x0008 ldr d0, [@rwd00] G_M46198_IG03: ;; offset=0x000C ldp fp, lr, [sp], #0x10 ret lr RWD00 dq FFFFFFFF00000001h ; Total bytes of code 20 ; Vector64.CreateHarmonicSequence<float>(start, step) ; Emitting BLENDED_CODE for arm64 on Windows G_M43901_IG01: ;; offset=0x0000 stp fp, lr, [sp, #-0x10]! mov fp, sp G_M43901_IG02: ;; offset=0x0008 ldr d16, [@rwd00] fmul v16.2s, v16.2s, v1.s[0] dup v0.2s, v0.s[0] fadd v0.2s, v16.2s, v0.2s ldr d16, [@RWD08] fdiv v0.2s, v16.2s, v0.2s G_M43901_IG03: ;; offset=0x0020 ldp fp, lr, [sp], #0x10 ret lr RWD00 dq 3F80000000000000h RWD08 dq 3F8000003F800000h ; Total bytes of code 40 ; Vector64.ConcatLowerLower<int>(left, right) ; Emitting BLENDED_CODE for arm64 on Windows G_M48061_IG01: ;; offset=0x0000 stp fp, lr, [sp, #-0x10]! mov fp, sp G_M48061_IG02: ;; offset=0x0008 ins v0.s[1], v1.s[0] G_M48061_IG03: ;; offset=0x000C ldp fp, lr, [sp], #0x10 ret lr ; Total bytes of code 20 ; Vector64.ConcatLowerUpper<int>(left, right) ; Emitting BLENDED_CODE for arm64 on Windows G_M62724_IG01: ;; offset=0x0000 stp fp, lr, [sp, #-0x10]! mov fp, sp G_M62724_IG02: ;; offset=0x0008 ins v0.s[1], v1.s[1] G_M62724_IG03: ;; offset=0x000C ldp fp, lr, [sp], #0x10 ret lr ; Total bytes of code 20 ; Vector64.ConcatUpperLower<int>(left, right) ; Emitting BLENDED_CODE for arm64 on Windows G_M2660_IG01: ;; offset=0x0000 stp fp, lr, [sp, #-0x10]! mov fp, sp G_M2660_IG02: ;; offset=0x0008 ins v0.s[0], v0.s[1] ins v0.s[1], v1.s[0] G_M2660_IG03: ;; offset=0x0010 ldp fp, lr, [sp], #0x10 ret lr ; Total bytes of code 24 ; Vector64.ConcatUpperUpper<int>(left, right) ; Emitting BLENDED_CODE for arm64 on Windows G_M55837_IG01: ;; offset=0x0000 stp fp, lr, [sp, #-0x10]! mov fp, sp G_M55837_IG02: ;; offset=0x0008 ins v0.s[0], v0.s[1] ins v0.s[1], v1.s[1] G_M55837_IG03: ;; offset=0x0010 ldp fp, lr, [sp], #0x10 ret lr ; Total bytes of code 24 ; Vector64.ZipLower<int>(left, right) ; Emitting BLENDED_CODE for arm64 on Windows G_M32585_IG01: ;; offset=0x0000 stp fp, lr, [sp, #-0x10]! mov fp, sp G_M32585_IG02: ;; offset=0x0008 zip1 v0.2s, v0.2s, v1.2s G_M32585_IG03: ;; offset=0x000C ldp fp, lr, [sp], #0x10 ret lr ; Total bytes of code 20 ; Vector64.ZipUpper<int>(left, right) ; Emitting BLENDED_CODE for arm64 on Windows G_M43976_IG01: ;; offset=0x0000 stp fp, lr, [sp, #-0x10]! mov fp, sp G_M43976_IG02: ;; offset=0x0008 zip2 v0.2s, v0.2s, v1.2s G_M43976_IG03: ;; offset=0x000C ldp fp, lr, [sp], #0x10 ret lr ; Total bytes of code 20 ; Vector64.Zip<int>(left, right) ; Emitting BLENDED_CODE for arm64 on Windows G_M14030_IG01: ;; offset=0x0000 stp fp, lr, [sp, #-0x10]! mov fp, sp G_M14030_IG02: ;; offset=0x0008 zip1 v16.2s, v0.2s, v1.2s zip2 v1.2s, v0.2s, v1.2s mov v0.8b, v16.8b G_M14030_IG03: ;; offset=0x0014 ldp fp, lr, [sp], #0x10 ret lr ; Total bytes of code 28 ; Vector64.UnzipEven<int>(left, right) ; Emitting BLENDED_CODE for arm64 on Windows G_M26249_IG01: ;; offset=0x0000 stp fp, lr, [sp, #-0x10]! mov fp, sp G_M26249_IG02: ;; offset=0x0008 uzp1 v0.2s, v0.2s, v1.2s G_M26249_IG03: ;; offset=0x000C ldp fp, lr, [sp], #0x10 ret lr ; Total bytes of code 20 ; Vector64.UnzipOdd<int>(left, right) ; Emitting BLENDED_CODE for arm64 on Windows G_M25438_IG01: ;; offset=0x0000 stp fp, lr, [sp, #-0x10]! mov fp, sp G_M25438_IG02: ;; offset=0x0008 uzp2 v0.2s, v0.2s, v1.2s G_M25438_IG03: ;; offset=0x000C ldp fp, lr, [sp], #0x10 ret lr ; Total bytes of code 20 ; Vector64.Unzip<int>(left, right) ; Emitting BLENDED_CODE for arm64 on Windows G_M41813_IG01: ;; offset=0x0000 stp fp, lr, [sp, #-0x10]! mov fp, sp G_M41813_IG02: ;; offset=0x0008 uzp1 v16.2s, v0.2s, v1.2s uzp2 v1.2s, v0.2s, v1.2s mov v0.8b, v16.8b G_M41813_IG03: ;; offset=0x0014 ldp fp, lr, [sp], #0x10 ret lr ; Total bytes of code 28 ; Vector64.Reverse<int>(vector) ; Emitting BLENDED_CODE for arm64 on Windows G_M63937_IG01: ;; offset=0x0000 stp fp, lr, [sp, #-0x10]! mov fp, sp G_M63937_IG02: ;; offset=0x0008 rev64 v0.2s, v0.2s G_M63937_IG03: ;; offset=0x000C ldp fp, lr, [sp], #0x10 ret lr ; Total bytes of code 20 ; Vector128.CreateGeometricSequence<int>(initial, 3) ; Emitting BLENDED_CODE for arm64 on Windows G_M55419_IG01: ;; offset=0x0000 stp fp, lr, [sp, #-0x10]! mov fp, sp G_M55419_IG02: ;; offset=0x0008 dup v0.4s, w0 ldr q16, [@rwd00] mul v0.4s, v0.4s, v16.4s G_M55419_IG03: ;; offset=0x0014 ldp fp, lr, [sp], #0x10 ret lr RWD00 dq 0000000300000001h, 0000001B00000009h ; Total bytes of code 28 ; Vector128.CreateAlternatingSequence<int>(even, odd) ; Emitting BLENDED_CODE for arm64 on Windows G_M23632_IG01: ;; offset=0x0000 stp fp, lr, [sp, #-0x10]! mov fp, sp G_M23632_IG02: ;; offset=0x0008 dup v0.4s, w0 dup v16.4s, w1 zip1 v0.4s, v0.4s, v16.4s G_M23632_IG03: ;; offset=0x0014 ldp fp, lr, [sp], #0x10 ret lr ; Total bytes of code 28 ; Vector128<int>.SignSequence ; Emitting BLENDED_CODE for arm64 on Windows G_M37526_IG01: ;; offset=0x0000 stp fp, lr, [sp, #-0x10]! mov fp, sp G_M37526_IG02: ;; offset=0x0008 ldr q0, [@rwd00] G_M37526_IG03: ;; offset=0x000C ldp fp, lr, [sp], #0x10 ret lr RWD00 dq FFFFFFFF00000001h, FFFFFFFF00000001h ; Total bytes of code 20 ; Vector128.CreateHarmonicSequence<float>(start, step) ; Emitting BLENDED_CODE for arm64 on Windows G_M24925_IG01: ;; offset=0x0000 stp fp, lr, [sp, #-0x10]! mov fp, sp G_M24925_IG02: ;; offset=0x0008 ldr q16, [@rwd00] fmul v16.4s, v16.4s, v1.s[0] dup v0.4s, v0.s[0] fadd v0.4s, v16.4s, v0.4s ldr q16, [@RWD16] fdiv v0.4s, v16.4s, v0.4s G_M24925_IG03: ;; offset=0x0020 ldp fp, lr, [sp], #0x10 ret lr RWD00 dq 3F80000000000000h, 4040000040000000h RWD16 dq 3F8000003F800000h, 3F8000003F800000h ; Total bytes of code 40 ; Vector128.ConcatLowerLower<int>(left, right) ; Emitting BLENDED_CODE for arm64 on Windows G_M47101_IG01: ;; offset=0x0000 stp fp, lr, [sp, #-0x10]! mov fp, sp G_M47101_IG02: ;; offset=0x0008 ins v0.d[1], v1.d[0] G_M47101_IG03: ;; offset=0x000C ldp fp, lr, [sp], #0x10 ret lr ; Total bytes of code 20 ; Vector128.ConcatLowerUpper<int>(left, right) ; Emitting BLENDED_CODE for arm64 on Windows G_M48932_IG01: ;; offset=0x0000 stp fp, lr, [sp, #-0x10]! mov fp, sp G_M48932_IG02: ;; offset=0x0008 ext v16.16b, v1.16b, v1.16b, #8 ins v0.d[1], v16.d[0] G_M48932_IG03: ;; offset=0x0010 ldp fp, lr, [sp], #0x10 ret lr ; Total bytes of code 24 ; Vector128.ConcatUpperLower<int>(left, right) ; Emitting BLENDED_CODE for arm64 on Windows G_M24196_IG01: ;; offset=0x0000 stp fp, lr, [sp, #-0x10]! mov fp, sp G_M24196_IG02: ;; offset=0x0008 ext v0.16b, v0.16b, v0.16b, #8 ins v0.d[1], v1.d[0] G_M24196_IG03: ;; offset=0x0010 ldp fp, lr, [sp], #0x10 ret lr ; Total bytes of code 24 ; Vector128.ConcatUpperUpper<int>(left, right) ; Emitting BLENDED_CODE for arm64 on Windows G_M45405_IG01: ;; offset=0x0000 stp fp, lr, [sp, #-0x10]! mov fp, sp G_M45405_IG02: ;; offset=0x0008 ext v0.16b, v0.16b, v0.16b, #8 ins v1.d[0], v0.d[0] mov v0.16b, v1.16b G_M45405_IG03: ;; offset=0x0014 ldp fp, lr, [sp], #0x10 ret lr ; Total bytes of code 28 ; Vector128.ZipLower<int>(left, right) ; Emitting BLENDED_CODE for arm64 on Windows G_M10057_IG01: ;; offset=0x0000 stp fp, lr, [sp, #-0x10]! mov fp, sp G_M10057_IG02: ;; offset=0x0008 zip1 v0.4s, v0.4s, v1.4s G_M10057_IG03: ;; offset=0x000C ldp fp, lr, [sp], #0x10 ret lr ; Total bytes of code 20 ; Vector128.ZipUpper<int>(left, right) ; Emitting BLENDED_CODE for arm64 on Windows G_M48936_IG01: ;; offset=0x0000 stp fp, lr, [sp, #-0x10]! mov fp, sp G_M48936_IG02: ;; offset=0x0008 zip2 v0.4s, v0.4s, v1.4s G_M48936_IG03: ;; offset=0x000C ldp fp, lr, [sp], #0x10 ret lr ; Total bytes of code 20 ; Vector128.Zip<int>(left, right) ; Emitting BLENDED_CODE for arm64 on Windows G_M32727_IG01: ;; offset=0x0000 stp fp, lr, [sp, #-0x10]! mov fp, sp G_M32727_IG02: ;; offset=0x0008 zip1 v16.4s, v0.4s, v1.4s zip2 v1.4s, v0.4s, v1.4s mov v0.16b, v16.16b G_M32727_IG03: ;; offset=0x0014 ldp fp, lr, [sp], #0x10 ret lr ; Total bytes of code 28 ; Vector128.UnzipEven<int>(left, right) ; Emitting BLENDED_CODE for arm64 on Windows G_M32745_IG01: ;; offset=0x0000 stp fp, lr, [sp, #-0x10]! mov fp, sp G_M32745_IG02: ;; offset=0x0008 uzp1 v0.4s, v0.4s, v1.4s G_M32745_IG03: ;; offset=0x000C ldp fp, lr, [sp], #0x10 ret lr ; Total bytes of code 20 ; Vector128.UnzipOdd<int>(left, right) ; Emitting BLENDED_CODE for arm64 on Windows G_M32638_IG01: ;; offset=0x0000 stp fp, lr, [sp, #-0x10]! mov fp, sp G_M32638_IG02: ;; offset=0x0008 uzp2 v0.4s, v0.4s, v1.4s G_M32638_IG03: ;; offset=0x000C ldp fp, lr, [sp], #0x10 ret lr ; Total bytes of code 20 ; Vector128.Unzip<int>(left, right) ; Emitting BLENDED_CODE for arm64 on Windows G_M7116_IG01: ;; offset=0x0000 stp fp, lr, [sp, #-0x10]! mov fp, sp G_M7116_IG02: ;; offset=0x0008 uzp1 v16.4s, v0.4s, v1.4s uzp2 v1.4s, v0.4s, v1.4s mov v0.16b, v16.16b G_M7116_IG03: ;; offset=0x0014 ldp fp, lr, [sp], #0x10 ret lr ; Total bytes of code 28 ; Vector128.Reverse<int>(vector) ; Emitting BLENDED_CODE for arm64 on Windows G_M36184_IG01: ;; offset=0x0000 stp fp, lr, [sp, #-0x10]! mov fp, sp G_M36184_IG02: ;; offset=0x0008 ldr q16, [@rwd00] tbl v0.16b, {v0.16b}, v16.16b G_M36184_IG03: ;; offset=0x0010 ldp fp, lr, [sp], #0x10 ret lr RWD00 dq 0B0A09080F0E0D0Ch, 0302010007060504h ; Total bytes of code 24 ``` </details> Codegen for constant input: <details> <summary>Vector256</summary> ```asm ; Vector256.CreateGeometricSequence<int>(2, 3) ; Emitting BLENDED_CODE for x64 + VEX + EVEX on Windows G_M53517_IG01: ;; offset=0x0000 G_M53517_IG02: ;; offset=0x0000 vmovups ymm0, ymmword ptr [reloc @rwd00] vmovups ymmword ptr [rcx], ymm0 mov rax, rcx G_M53517_IG03: ;; offset=0x000F vzeroupper ret RWD00 dq 0000000600000002h, 0000003600000012h, 000001E6000000A2h, 00001116000005B2h ; Total bytes of code 19 ; Vector256.CreateAlternatingSequence<int>(5, 7) ; Emitting BLENDED_CODE for x64 + VEX + EVEX on Windows G_M39644_IG01: ;; offset=0x0000 G_M39644_IG02: ;; offset=0x0000 vbroadcastsd ymm0, qword ptr [reloc @rwd00] vmovups ymmword ptr [rcx], ymm0 mov rax, rcx G_M39644_IG03: ;; offset=0x0010 vzeroupper ret RWD00 dq 0000000700000005h ; Total bytes of code 20 ; Vector256.CreateHarmonicSequence<float>(1.0f, 2.0f) ; Emitting BLENDED_CODE for x64 + VEX + EVEX on Windows G_M64276_IG01: ;; offset=0x0000 G_M64276_IG02: ;; offset=0x0000 vmovups ymm0, ymmword ptr [reloc @rwd00] vmovups ymmword ptr [rcx], ymm0 mov rax, rcx G_M64276_IG03: ;; offset=0x000F vzeroupper ret RWD00 dq 3EAAAAAB3F800000h, 3E1249253E4CCCCDh, 3DBA2E8C3DE38E39h, 3D8888893D9D89D9h ; Total bytes of code 19 ``` </details> <details> <summary>Vector512</summary> ```asm ; Vector512.CreateGeometricSequence<int>(2, 3) ; Emitting BLENDED_CODE for x64 + VEX + EVEX on Windows G_M22445_IG01: ;; offset=0x0000 G_M22445_IG02: ;; offset=0x0000 vmovups zmm0, zmmword ptr [reloc @rwd00] vmovups zmmword ptr [rcx], zmm0 mov rax, rcx G_M22445_IG03: ;; offset=0x0013 vzeroupper ret RWD00 dq 0000000600000002h, 0000003600000012h, 000001E6000000A2h, 00001116000005B2h, 000099C600003342h, 000567F60001CD52h, 0030A7A6001037E2h, 01B5E4D60091F6F2h ; Total bytes of code 23 ; Vector512.CreateAlternatingSequence<int>(5, 7) ; Emitting BLENDED_CODE for x64 + VEX + EVEX on Windows G_M9468_IG01: ;; offset=0x0000 G_M9468_IG02: ;; offset=0x0000 vbroadcastsd zmm0, qword ptr [reloc @rwd00] vmovups zmmword ptr [rcx], zmm0 mov rax, rcx G_M9468_IG03: ;; offset=0x0013 vzeroupper ret RWD00 dq 0000000700000005h ; Total bytes of code 23 ; Vector512.CreateHarmonicSequence<float>(1.0f, 2.0f) ; Emitting BLENDED_CODE for x64 + VEX + EVEX on Windows G_M13716_IG01: ;; offset=0x0000 G_M13716_IG02: ;; offset=0x0000 vmovups zmm0, zmmword ptr [reloc @rwd00] vmovups zmmword ptr [rcx], zmm0 mov rax, rcx G_M13716_IG03: ;; offset=0x0013 vzeroupper ret RWD00 dq 3EAAAAAB3F800000h, 3E1249253E4CCCCDh, 3DBA2E8C3DE38E39h, 3D8888893D9D89D9h, 3D5794363D70F0F1h, 3D3216433D430C31h, 3D17B4263D23D70Ah, 3D0421083D0D3DCBh ; Total bytes of code 23 ``` </details> <details> <summary>Vector512 without AVX512 - Vector256 decomposition path</summary> ```asm ; Vector512.CreateGeometricSequence<int>(2, 3) ; Emitting BLENDED_CODE for x64 + VEX on Windows G_M22445_IG01: ;; offset=0x0000 G_M22445_IG02: ;; offset=0x0000 vmovups ymm0, ymmword ptr [reloc @rwd00] vmovups ymm1, ymmword ptr [reloc @RWD32] vmovups ymmword ptr [rcx], ymm1 vmovups ymmword ptr [rcx+0x20], ymm0 mov rax, rcx G_M22445_IG03: ;; offset=0x001C vzeroupper ret RWD00 dq 000099C600003342h, 000567F60001CD52h, 0030A7A6001037E2h, 01B5E4D60091F6F2h RWD32 dq 0000000600000002h, 0000003600000012h, 000001E6000000A2h, 00001116000005B2h ; Total bytes of code 32 ; Vector512.CreateAlternatingSequence<int>(5, 7) ; Emitting BLENDED_CODE for x64 + VEX on Windows G_M9468_IG01: ;; offset=0x0000 G_M9468_IG02: ;; offset=0x0000 vbroadcastsd ymm0, qword ptr [reloc @rwd00] vmovups ymmword ptr [rcx], ymm0 vmovups ymmword ptr [rcx+0x20], ymm0 mov rax, rcx G_M9468_IG03: ;; offset=0x0015 vzeroupper ret RWD00 dq 0000000700000005h ; Total bytes of code 25 ; Vector512.CreateHarmonicSequence<float>(1.0f, 2.0f) ; Emitting BLENDED_CODE for x64 + VEX on Windows G_M13716_IG01: ;; offset=0x0000 G_M13716_IG02: ;; offset=0x0000 vmovups ymm0, ymmword ptr [reloc @rwd00] vmovups ymmword ptr [rcx], ymm0 vmovups ymm0, ymmword ptr [reloc @RWD32] vmovups ymmword ptr [rcx+0x20], ymm0 mov rax, rcx G_M13716_IG03: ;; offset=0x001C vzeroupper ret RWD00 dq 3EAAAAAB3F800000h, 3E1249253E4CCCCDh, 3DBA2E8C3DE38E39h, 3D8888893D9D89D9h RWD32 dq 3D5794363D70F0F1h, 3D3216433D430C31h, 3D17B4263D23D70Ah, 3D0421083D0D3DCBh ; Total bytes of code 32 ``` </details> Closes dotnet#122557 cc: @tannergooding
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part 1 of 5 stacked PRs splitting dotnet#126408.
Stack walker fixes + GC reference scanning foundation.
Note
This PR was created with AI assistance from Copilot.