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

AdvSimd: Invalid "The constant does not fit within the value bounds of '0' to '15'" warning #103556

Closed
EgorBo opened this issue Jun 17, 2024 · 3 comments · Fixed by #103590
Closed

Comments

@EgorBo
Copy link
Member

EgorBo commented Jun 17, 2024

Compile the following code:

Vector128<ulong> v = Vector128.Create(ulong.MaxValue);
_ = AdvSimd.ShiftLeftLogical(v, 32);

Expected:

no warning

Actual:

Warning CA1857: The constant does not fit within the value bounds of '0' to '15'

Seems like other overloads are affected as well.

cc @tannergooding

SHL arm reference: https://developer.arm.com/documentation/ddi0602/2024-03/SIMD-FP-Instructions/SHL--Shift-Left--immediate--

@dotnet-issue-labeler dotnet-issue-labeler bot added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label Jun 17, 2024
@dotnet-policy-service dotnet-policy-service bot added the untriaged New issue has not been triaged by the area owner label Jun 17, 2024
Copy link
Contributor

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

@EgorBo EgorBo added area-System.Numerics and removed area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI labels Jun 17, 2024
Copy link
Contributor

Tagging subscribers to this area: @dotnet/area-system-numerics
See info in area-owners.md if you want to be subscribed.

@tannergooding
Copy link
Member

Hmmm, the ConstantExpected for ShiftLeftLogical* seem wrong in general. They are effectively inverted and twice as large of a constant as they should be.

@dotnet-policy-service dotnet-policy-service bot removed the untriaged New issue has not been triaged by the area owner label Jun 18, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Jul 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 a pull request may close this issue.

2 participants