Skip to content

Add support for doubly nested intrinsic classes#105761

Merged
jakobbotsch merged 10 commits intodotnet:mainfrom
jakobbotsch:fix-105402
Aug 10, 2024
Merged

Add support for doubly nested intrinsic classes#105761
jakobbotsch merged 10 commits intodotnet:mainfrom
jakobbotsch:fix-105402

Conversation

@jakobbotsch
Copy link
Member

@jakobbotsch jakobbotsch commented Jul 31, 2024

System.Runtime.Intrinsics.X86.Avx10v1+V512+X64.IsSupported currently results in an infinite loop. This PR fixes the problem by adding support in various places for hardware intrinsic classes nested more than once.

  • Expand getMethodNameFromMetadata to allow returning names of multiple enclosing classes
  • Expand the type loader to recognize intrinsics in up to 2x nested classes
  • Fix the JIT recognition to handle potentially multi-nested intrinsic classes
  • Fix NAOT support for opportunistically querying for Avx10v1 support

Fix #105402

@ghost ghost added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label Jul 31, 2024
@jakobbotsch
Copy link
Member Author

cc @dotnet/jit-contrib PTAL @tannergooding @MichalStrehovsky @jkotas

{
var owningMdType = (MetadataType)owningType;
string ns = owningMdType.ContainingType?.Namespace ?? owningMdType.Namespace;
string ns = owningMdType.ContainingType?.ContainingType?.Namespace ??
Copy link
Member

Choose a reason for hiding this comment

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

Nit: It would be nice to avoid calling the virtual ContainingType property multiple times.

Copy link
Member Author

Choose a reason for hiding this comment

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

Fixed

Copy link
Member

@jkotas jkotas left a comment

Choose a reason for hiding this comment

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

Thanks

@jakobbotsch jakobbotsch merged commit 8fee24f into dotnet:main Aug 10, 2024
@jakobbotsch jakobbotsch deleted the fix-105402 branch August 10, 2024 16:00
@github-actions github-actions bot locked and limited conversation to collaborators Sep 10, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

System.Runtime.Intrinsics.X86.Avx10v1+V512+X64.IsSupported is not expanded and results in an infinite loop

3 participants