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

Intrinsics code not linked out in Blazor sample #1615

Closed
CoffeeFlux opened this issue Nov 9, 2020 · 5 comments
Closed

Intrinsics code not linked out in Blazor sample #1615

CoffeeFlux opened this issue Nov 9, 2020 · 5 comments

Comments

@CoffeeFlux
Copy link

When creating a new Blazor sample (dotnet new blazorwasm) and publishing in release, the linked corelib appears to still have lots of entries in System.Runtime.Intrinsics.*, which are kept around because of a call to System.Runtime.Intrinsics.Vector128. This appears to be used in Utf8Utility.GetPointerToFirstInvalidByte, but is guarded behind a call to AdvSimd.Arm64.IsSupported and ought to be linked out.

@vitek-karas
Copy link
Member

This has been fixed in dotnet/runtime#43537. The fix didn't make 5.0 RTM. But in 6.0 it's there - I haven't validated by building against latest 6.0, but the code is missing from corelib in local build (so it won't be there when trimmed in an app).

@akoeplinger
Copy link
Member

akoeplinger commented Nov 11, 2020

@vitek-karas I still see the intrinsics types in a linked System.Private.CoreLib.dll in dotnet/runtime using the wasm sample we have. Maybe it's being kept due to some other code path. It shouldn't need the 6.0 SDK right?

@akoeplinger akoeplinger reopened this Nov 11, 2020
@akoeplinger
Copy link
Member

the types only have the IsSupported property in them though. not sure if the linker should strip out those too?

@akoeplinger
Copy link
Member

Hm looks like this is intentional: #1106

@marek-safar
Copy link
Contributor

Only IsSupported calls should remain

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants