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

[armel] Crossgen2 skips methods like GetIndexOfFirstNonAsciiByte_Default that use Vector<T> #45794

Open
t-mustafin opened this issue Dec 8, 2020 · 4 comments

Comments

@t-mustafin
Copy link
Contributor

The first group of uncompiled methods from #44948 uses Vector<T>. During crossgen2 of GetIndexOfFirstNonAsciiByte_Default() method couple of exceptions is thrown and compilation is rejected.

First exception is thrown from CorInfoImpl.cs#L838 and could be fixed by:

@ -853,7 +853,7 @@ private uint getMethodAttribsInternal(MethodDesc method)
                 DefType owningDefType = method.OwningType as DefType;
                 if (owningDefType != null && VectorOfTFieldLayoutAlgorithm.IsVectorOfTType(owningDefType))
                 {
-                    throw new RequiresRuntimeJitException("This function is using SIMD intrinsics, their size is machine specific");
+                    VerifyMethodSignatureIsStable(method.Signature);
                 }
             }
 #endif

Second exception is thrown from CorInfoImpl.cs#L1556 due to indeterminate Vector<T> size on compiling time. The size depends on similarSpecifiedVector variable. To make similarSpecifiedVector became nonull I made experiment with changing matchingVectorType default value:

@@ -99,7 +99,7 @@ public ReadyToRunCompilerContext(TargetDetails details, SharedGenericsMode gener
             // Only the Arm64 JIT respects the OS rules for vector type abi currently
             _vectorFieldLayoutAlgorithm = new VectorFieldLayoutAlgorithm(_r2rFieldLayoutAlgorithm, (details.Architecture == TargetArchitecture.ARM64) ? true : bubbleIncludesCorelib);
 
-            string matchingVectorType = "Unknown";
+            string matchingVectorType = "Vector128`1";
             if (details.MaximumSimdVectorLength == SimdVectorLength.Vector128Bit)
                 matchingVectorType = "Vector128`1";
             else if (details.MaximumSimdVectorLength == SimdVectorLength.Vector256Bit)

That experiment was successful on armel, Calculator app starts after crossgen2 and GetIndexOfFirstNonAsciiByte_Default method was precompiled by crossgen2.
How machingVectorType or similarSpecifiedVector should be calculated by crossgen2 with _vectorAbiIsStable = true?

cc @davidwrighton @jkotas @alpencolt

@Dotnet-GitSync-Bot Dotnet-GitSync-Bot added area-crossgen2-coreclr untriaged New issue has not been triaged by the area owner labels Dec 8, 2020
@mangod9 mangod9 removed the untriaged New issue has not been triaged by the area owner label Dec 9, 2020
@mangod9 mangod9 added this to the 6.0.0 milestone Dec 9, 2020
@mangod9
Copy link
Member

mangod9 commented Aug 3, 2021

Is this still something which will be fixed for .net 6?

@davidwrighton
Copy link
Member

Not unless #46069 reaches a state of passing all the tests. I'm moving this to .NET 7.

@davidwrighton davidwrighton modified the milestones: 6.0.0, 7.0.0 Aug 3, 2021
@mangod9 mangod9 modified the milestones: 7.0.0, 8.0.0 Jul 27, 2022
@trylek trylek mentioned this issue May 3, 2023
46 tasks
@trylek
Copy link
Member

trylek commented Aug 1, 2023

I don't think we're going to be able to do anything about this for .NET 8 especially as David is OOF until the end of August, moving to .NET 9.

@trylek trylek modified the milestones: 8.0.0, 9.0.0 Aug 1, 2023
@steveisok
Copy link
Member

I'd still like us to look at this. I'm going to ignore this has been milestone bumped all the way back to 6.0 and move it to 10 :-).

@steveisok steveisok modified the milestones: 9.0.0, 10.0.0 Aug 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants