Skip to content

Conversation

@MichalStrehovsky
Copy link
Member

GetHardwareIntrinsicId should not handle x64 intrinsics on x86.

However, we were relying on this happening in IsHardwareIntrinsic. So also fixing IsHardwareIntrinsic to work the same as CoreCLR VM.

Cc @dotnet/ilc-contrib

@dotnet-policy-service
Copy link
Contributor

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

Comment on lines -83 to -84
if (potentialType.Name == "X64")
potentialType = (MetadataType)potentialType.ContainingType;
Copy link
Member

Choose a reason for hiding this comment

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

Is this "correct"? Should we not just return "" instead to simplify things and ensure that potentialType.Name isn't returned (in this case "X64")?

Copy link
Member Author

Choose a reason for hiding this comment

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

If this is the X64 nested type, we'll take the exit on line 86 and return an empty string. Nested types don't set a namespace so (potentialType.Namespace != "System.Runtime.Intrinsics.X86") is true.

@jkotas jkotas merged commit 6d412f4 into dotnet:main Mar 19, 2024
@MichalStrehovsky MichalStrehovsky deleted the altfix branch March 19, 2024 23:38
@github-actions github-actions bot locked and limited conversation to collaborators Apr 19, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants