Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Apple arm64 SIMD12(SIMD16) passing. #56521

Merged
merged 2 commits into from
Jul 29, 2021

Conversation

sandreenko
Copy link
Contributor

Fixes #49453, and closing #49110 (was fixed by JanV's changes).

@sandreenko sandreenko added arch-arm64 os-mac-os-x macOS aka OSX area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI labels Jul 29, 2021
@sandreenko
Copy link
Contributor Author

The tree looks like:

N004 (  3,  2) [000046] -------N----        t46 =    LCL_VAR   simd12<System.Numerics.Vector3> V02 arg2
                                                  /--*  t46    simd12
               [000190] ------------              *  PUTARG_STK [+0x00] void   (12 stackByteSize), (0 byteOffset)

when on other platforms PUTARG_STK is 16 bytes.

Note that we already had special logic for 12 arguments passed as SIMD12 in the struct case but it was missed in non-struct case.

// For a 12-byte structSize we will we will generate two load instructions
// ldr x2, [x0]
// ldr w3, [x0, #8]
// str x2, [sp, #16]
// str w3, [sp, #24]

@sandreenko
Copy link
Contributor Author

PTAL @BruceForstall @dotnet/jit-contrib , cc @janvorli

@sandreenko
Copy link
Contributor Author

Another note: we can't reuse struct case because structs are coming in memory. We currently don't treat m_size==12 as enregistrable type.

// TODO: check TYP_SIMD12 profitability,
// it will need additional support in `BuildStoreLoc`.
case 16:
return TYP_SIMD16;

@sandreenko sandreenko merged commit 3d00644 into dotnet:main Jul 29, 2021
@sandreenko sandreenko mentioned this pull request Aug 2, 2021
10 tasks
@ghost ghost locked as resolved and limited conversation to collaborators Aug 28, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
arch-arm64 area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI os-mac-os-x macOS aka OSX
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Apple Silicon JIT Assert - spurious?
2 participants