Skip to content

Lower checked integer shifts through the Whale adapter #863

Closed

Description

@LunaStev

Motivation

The initial Whale adapter rejects shifts. Wave already defines result width, signed right shift and invalid-count behavior; the adapter must preserve those decisions. Related to #93.

Scope

Use HIR types and check the original RHS before narrowing. Negative or out-of-range runtime counts trap; invalid evaluated constants remain frontend errors. Support the existing 8–128-bit runtime subset and full-value constant count checks. No native execution claim.

Implementation status: Already implemented in open PR #860. This issue restores missing tracking; do not duplicate the implementation. Review and final PR validation remain with that PR.

Completion criteria

  • Preserve LHS result width and signed/unsigned right-shift semantics.
  • Test original-count guards before narrowing across supported widths.
  • Keep short-circuit behavior and reject wider unsupported runtime counts.

Activity

  1. self-assigned this
    on Oct 7, 2026
  2. added
    enhancementA request for a new feature or improvement.
    ready for reviewThe pull request or issue is ready for review.
    on Oct 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementA request for a new feature or improvement.ready for reviewThe pull request or issue is ready for review.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions