From fa23fc966e26524e070f573b8c0a5f51c6dec67e Mon Sep 17 00:00:00 2001 From: David Wrighton Date: Thu, 4 Aug 2022 15:05:32 -0700 Subject: [PATCH] Fix issue where calculation of valuetypeshapecharacteristic on Arm64 does not match native runtime - We didn't check to make sure that the type of the Vector was a primitive numeric as the runtime does - Re-enable test --- .../Compiler/ReadyToRunCompilerContext.cs | 3 ++- src/tests/issues.targets | 3 --- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/coreclr/tools/aot/ILCompiler.ReadyToRun/Compiler/ReadyToRunCompilerContext.cs b/src/coreclr/tools/aot/ILCompiler.ReadyToRun/Compiler/ReadyToRunCompilerContext.cs index 97e5bd69e395ae..73dcd33c1b2f99 100644 --- a/src/coreclr/tools/aot/ILCompiler.ReadyToRun/Compiler/ReadyToRunCompilerContext.cs +++ b/src/coreclr/tools/aot/ILCompiler.ReadyToRun/Compiler/ReadyToRunCompilerContext.cs @@ -255,7 +255,8 @@ public override ComputedStaticFieldLayout ComputeStaticFieldLayout(DefType type, public override ValueTypeShapeCharacteristics ComputeValueTypeShapeCharacteristics(DefType type) { - if (type.Context.Target.Architecture == TargetArchitecture.ARM64) + if (type.Context.Target.Architecture == TargetArchitecture.ARM64 && + type.Instantiation[0].IsPrimitiveNumeric) { return type.InstanceFieldSize.AsInt switch { diff --git a/src/tests/issues.targets b/src/tests/issues.targets index a720de9c70abc5..2d586226fc9bfc 100644 --- a/src/tests/issues.targets +++ b/src/tests/issues.targets @@ -227,9 +227,6 @@ https://github.com/dotnet/runtime/issues/67870 - - https://github.com/dotnet/runtime/issues/60036 - https://github.com/dotnet/runtime/issues/60154