Skip to content

Conversation

@snickolls-arm
Copy link
Contributor

The type is experimental and will only be materialized on ARM64, when DOTNET_JitUseScalableVectorT=1. This change covers initial properties of the type and pattern matching the type during import.

The type is experimental and will only be materialized
on ARM64, when DOTNET_JitUseScalableVectorT=1. This
change covers initial properties of the type and
pattern matching the type during import.
@github-actions github-actions bot added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label Nov 12, 2025
@dotnet-policy-service dotnet-policy-service bot added the community-contribution Indicates that the PR has been added by a community member label Nov 12, 2025
@dotnet-policy-service
Copy link
Contributor

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

@snickolls-arm
Copy link
Contributor Author

@dotnet/arm64-contrib

JITDUMP(" Found Vector<%s>\n", varTypeName(JitType2PreciseVarType(simdBaseJitType)));

#ifdef TARGET_ARM64
if (compExactlyDependsOn(InstructionSet_Sve_Arm64) && JitConfig.JitUseScalableVectorT())
Copy link
Member

Choose a reason for hiding this comment

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

nit: We want these swapped so that we aren't tagging a R2R or other images as requiring SVE unnecessarily.

It may even be desired for this to be an opportunistic check since the behavior in safe code is behaviorally the same. Its largely an optimization to use larger vectors.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I forgot this has a side effect. Will swap it around.

Agreed this should be opportunistic. We'll want to respect the user choices of features.

DEF_TP(SIMD32 ,"simd32" , TYP_SIMD32, 32,32, 32, 8,16, VTR_FLOAT, availableDoubleRegs, RBM_FLT_CALLEE_SAVED, RBM_FLT_CALLEE_TRASH, VTF_S|VTF_VEC)
DEF_TP(SIMD64 ,"simd64" , TYP_SIMD64, 64,64, 64, 16,16, VTR_FLOAT, availableDoubleRegs, RBM_FLT_CALLEE_SAVED, RBM_FLT_CALLEE_TRASH, VTF_S|VTF_VEC)
#elif defined(TARGET_ARM64)
DEF_TP(SIMD ,"simd" , TYP_SIMD, SZU,EAU,EAU, 0,16, VTR_FLOAT, availableDoubleRegs, RBM_FLT_CALLEE_SAVED, RBM_FLT_CALLEE_TRASH, VTF_VEC)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Do we want to classify this as a structure with VTF_S? Not doing so seems to be turning off quite a few code paths that would be problematic for something without a size, which is good. Can you have a structure that doesn't have a size, in principal?

Copy link
Member

Choose a reason for hiding this comment

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

I expect we'll have a number of places to fixup in either case.

If we don't mark it as a struct, we'll have a lot of places to update to ensure it gets the same optimizations, lightup, and general handling.

If we do mark it as a struct, there will be a number of places that need to be updated to handle "unknown size".

I expect marking it as a struct to be inline with the other SIMD types is the better approach.

Can you have a structure that doesn't have a size, in principal?

It's not that it doesn't have a size (i.e. 0), it's that the size is unknown (at least 16 and up to 256 bytes).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI community-contribution Indicates that the PR has been added by a community member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants