Skip to content

AdvSimd shift+widen invalid imm8 range #122590

Open

Description

@ovska

Description

AdvSimd.ShiftLeftLogicalWideningLower and friends have the imm argument limited to one too low. For example only 7 when widening bytes. Docs say you should be able to use the full bit width (e.g. 8 on uint8):
https://developer.arm.com/documentation/dui0473/m/neon-instructions/vshll--by-immediate-

Reproduction Steps

AdvSimd.ShiftLeftLogicalWideningLower(Vector64<byte>.One, 8)

Encountered when trying to widen a byte vector's MSB's to uints.

Expected behavior

Imm8 range 0..8

Actual behavior

Imm8 range 0..7, using 8 produces a diagnostic and throws an exception on runtime

Regression?

Known Workarounds

Widen first, then shift manually (a few extra ops).

Configuration

.NET 10.0.100
macOS 26.1 (25B78)

Other information

No response

Activity

  1. added
    needs-area-label
    on Dec 16, 2025
  2. added
    untriaged
    on Dec 16, 2025
  3. added and removed
    needs-area-label
    on Dec 16, 2025
  4. dotnet-policy-service commented on Dec 16, 2025

    @dotnet-policy-service
    Contributor

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

  5. added this to the Future milestone on Aug 17, 2026
  6. removed
    untriaged
    on Aug 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions