Skip to content

Conversation

@tannergooding
Copy link
Member

This resolves #106838

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

Extracted from #106594 so that it can be backported to .NET 9

@tannergooding
Copy link
Member Author

CC. @dotnet/jit-contrib for review

This fixes #106838 and will need backport

Copy link
Member

@EgorBo EgorBo left a comment

Choose a reason for hiding this comment

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

x64 has a similar path - is it ok as is?

@tannergooding
Copy link
Member Author

tannergooding commented Aug 26, 2024

x64 has a similar path - is it ok as is?

Yes. The issue here was specifically with multiplication by a scalar, since Arm64 handles it by extracting the separate components.

For x64, we always broadcast that scalar to a vector and then use a vectorized implementation instead, not extracting.

-- The test is notably also xplat, not Arm64 specific and so is also validating that x64 is correct.

@tannergooding tannergooding merged commit 086ee66 into dotnet:main Aug 26, 2024
@tannergooding tannergooding deleted the fix-106838 branch August 26, 2024 15:32
@tannergooding
Copy link
Member Author

/backport to release/9.0

@github-actions
Copy link
Contributor

Started backporting to release/9.0: https://github.com/dotnet/runtime/actions/runs/10562736191

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.

SIMD multiplication by scalar UInt64 can produce incorrect results on Arm64

2 participants