Uh oh!
There was an error while loading. Please reload this page.
Add lane construction and composition APIs - #127690
Conversation
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Adds new vector sequence-generation helpers (geometric/alternating/harmonic/cauchy), sign-sequence helpers, and lane-manipulation operations (zip/unzip/concat/reverse) across Vector<T> and Vector{64,128,256,512}<T>, including JIT recognition and test coverage.
Changes:
- Introduces new public APIs in the ref assemblies for sequence creation + lane operations and
SignSequence. - Implements the APIs in CoreLib for
Vector<T>andVector{64,128,256,512}<T>, with some JIT fast-paths. - Adds unit tests validating the new behaviors across vector widths.
Reviewed changes
Copilot reviewed 23 out of 23 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector64Tests.cs | Adds tests for new Vector64 sequence + lane APIs |
| src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector128Tests.cs | Adds tests for new Vector128 sequence + lane APIs |
| src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector256Tests.cs | Adds tests for new Vector256 sequence + lane APIs |
| src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector512Tests.cs | Adds tests for new Vector512 sequence + lane APIs |
| src/libraries/System.Runtime.Intrinsics/ref/System.Runtime.Intrinsics.cs | Exposes new Vector{64,128,256,512} APIs in the reference contract |
| src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Vector64_1.cs | Adds Vector64<T>.SignSequence |
| src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Vector64.cs | Implements Vector64 sequence + lane APIs |
| src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Vector128_1.cs | Adds Vector128<T>.SignSequence |
| src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Vector128.cs | Implements Vector128 sequence + lane APIs |
| src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Vector256_1.cs | Adds Vector256<T>.SignSequence |
| src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Vector256.cs | Implements Vector256 sequence + lane APIs |
| src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Vector512_1.cs | Adds Vector512<T>.SignSequence |
| src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Vector512.cs | Implements Vector512 sequence + lane APIs + AVX-512 special-cases |
| src/libraries/System.Private.CoreLib/src/System/Numerics/Vector_1.cs | Adds Vector<T>.SignSequence |
| src/libraries/System.Private.CoreLib/src/System/Numerics/Vector.cs | Implements Vector sequence + lane APIs |
| src/libraries/System.Numerics.Vectors/tests/GenericVectorTests.cs | Adds tests for new System.Numerics.Vector APIs |
| src/libraries/System.Numerics.Vectors/ref/System.Numerics.Vectors.cs | Exposes new System.Numerics.Vector APIs in the reference contract |
| src/coreclr/jit/hwintrinsicxarch.cpp | Adds xarch JIT special-import support for new intrinsics |
| src/coreclr/jit/hwintrinsiclistxarch.h | Registers new xarch HW intrinsic IDs |
| src/coreclr/jit/hwintrinsicarm64.cpp | Adds arm64 JIT special-import support for new intrinsics |
| src/coreclr/jit/hwintrinsiclistarm64.h | Registers new arm64 HW intrinsic IDs |
| src/coreclr/jit/compiler.h | Declares new SIMD IR node builders used by importer/lowering |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 23 out of 23 changed files in this pull request and generated 8 comments.
Comments suppressed due to low confidence (4)
src/coreclr/jit/gentree.cpp:1
- Several simdCount==1 special-cases use gtWrapWithSideEffects in a way that can reverse the required left-to-right argument evaluation order (op1 then op2) for intrinsics like Concat/Zip/Unzip, and for CreateAlternatingSequence. This is observable for Vector64/Vector64 (and similar) where the vector length is 1 and arguments may have side-effects. Consider materializing op1 into a temp before sequencing op2, or otherwise constructing the tree so op1 is evaluated before op2 while still returning op1 (or the correct constant for UnzipOdd).
src/coreclr/jit/gentree.cpp:1 - Several simdCount==1 special-cases use gtWrapWithSideEffects in a way that can reverse the required left-to-right argument evaluation order (op1 then op2) for intrinsics like Concat/Zip/Unzip, and for CreateAlternatingSequence. This is observable for Vector64/Vector64 (and similar) where the vector length is 1 and arguments may have side-effects. Consider materializing op1 into a temp before sequencing op2, or otherwise constructing the tree so op1 is evaluated before op2 while still returning op1 (or the correct constant for UnzipOdd).
src/coreclr/jit/gentree.cpp:1 - Several simdCount==1 special-cases use gtWrapWithSideEffects in a way that can reverse the required left-to-right argument evaluation order (op1 then op2) for intrinsics like Concat/Zip/Unzip, and for CreateAlternatingSequence. This is observable for Vector64/Vector64 (and similar) where the vector length is 1 and arguments may have side-effects. Consider materializing op1 into a temp before sequencing op2, or otherwise constructing the tree so op1 is evaluated before op2 while still returning op1 (or the correct constant for UnzipOdd).
src/coreclr/jit/gentree.cpp:1 - Several simdCount==1 special-cases use gtWrapWithSideEffects in a way that can reverse the required left-to-right argument evaluation order (op1 then op2) for intrinsics like Concat/Zip/Unzip, and for CreateAlternatingSequence. This is observable for Vector64/Vector64 (and similar) where the vector length is 1 and arguments may have side-effects. Consider materializing op1 into a temp before sequencing op2, or otherwise constructing the tree so op1 is evaluated before op2 while still returning op1 (or the correct constant for UnzipOdd).
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Tagging subscribers to this area: @dotnet/area-system-runtime-intrinsics |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
hez2010
commented
Jun 18, 2026
Ping. |
hez2010
commented
Jun 19, 2026
It seems that win-arm64 CI is lagging. |
tannergooding
commented
Jun 19, 2026
/ba-g unrelated timeouts |
MichalStrehovsky
commented
Jun 19, 2026
This change broke main: @dotnet/jit-contrib unless you have a quick fix, I staged a revert at #129610. I think we can merge without waiting for CI. |
hez2010
commented
Jun 19, 2026
Wondering why this build failure was not captured by the CI. |
pavelsavara
commented
Jun 19, 2026
This is untested fix attempt https://github.com/dotnet/runtime/compare/main...pavelsavara:wasm_fix_jit?expand=1 |
MichalStrehovsky
commented
Jun 19, 2026
Reverted. This broke two pull requests and was hit locally in #129607. Not going to wait. |
MichalStrehovsky
commented
Jun 19, 2026
The results were 3 days stale. The older the results, the more likely this conflicts with something else. |
It seems that recently landed wasm jit simd enablement change breaks the build of this PR. Now we need to #ifdef out the wasm path. |
tannergooding
commented
Jun 19, 2026
I had missed that it was 3 days stale and that another PR had gone in touching the area (which is rarely touched by anyone else). @hez2010 could you get up a revert of the revert + one additional commit including the relevant fix so WASM doesn't fail? Having the paths do |
This is a leftover from #127690. We need to annotate `CreateGeometricSequence` as non-invalid node as it might be left as GenTree node to benefit from constant propagation. @tannergooding
This PR adds lane construction and composition APIs approved in #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#122557 cc: @tannergooding
This is a leftover from #127690. We need to annotate `CreateGeometricSequence` as non-invalid node as it might be left as GenTree node to benefit from constant propagation. @tannergooding
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> Closesdotnet#122557 cc: @tannergooding
This is a leftover from dotnet#127690. We need to annotate `CreateGeometricSequence` as non-invalid node as it might be left as GenTree node to benefit from constant propagation. @tannergooding
This PR adds lane construction and composition APIs approved in #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 constructionvperm2i128for 256-bit zip/unzipThe ARM64 lowering avoids table-lookup forms for small fixed concat/reverse operations and uses direct element moves where applicable, such as
insandrev64.CreateCauchySequencehas been removed as it doesn't make sense at all. AndSignSequencehas been moved to an extension property as we only want to expose it for signed numbers.Codegen:
Vector128
Vector256
Vector512
ARM64
Codegen for constant input:
Vector256
Vector512
Vector512 without AVX512 - Vector256 decomposition path
Closes#122557
cc: @tannergooding