The types Vector64<T> and Vector128<T> are intended to map to ABI Short Vector fundamental types. These should be passed in vector registers.
Current code will pass these in integer registers.
IsShortVector can be crudely implemented as follows:
bool Compiler::IsShortVector(CORINFO_CLASS_HANDLE hClass)
{
return isIntrinsicType(hClass) && (getBaseTypeOfSIMDType(hClass) != TYP_UNKNOWN);
}
Compiler::getPrimitiveTypeForStruct() can be trivially updated to return TYP_SIMD8 or TYP_SIMD16 when IsShortVector() == true
I made an initial naive attempt to implement and failed, but I really need a design discussion.
@CarolEidt @tannergooding @dotnet/arm64-contrib @dotnet/jit-contrib
category:reach
theme:intrinsics
skill-level:expert
cost:medium
The types
Vector64<T>andVector128<T>are intended to map to ABIShort Vectorfundamental types. These should be passed in vector registers.Current code will pass these in integer registers.
IsShortVectorcan be crudely implemented as follows:Compiler::getPrimitiveTypeForStruct()can be trivially updated to returnTYP_SIMD8orTYP_SIMD16whenIsShortVector() == trueI made an initial naive attempt to implement and failed, but I really need a design discussion.
@CarolEidt @tannergooding @dotnet/arm64-contrib @dotnet/jit-contrib
category:reach
theme:intrinsics
skill-level:expert
cost:medium