Skip to content

[Arm64] Fix issue 138387 - #138622

Open
rcj1 wants to merge 2 commits into
dotnet:mainfrom
rcj1:fix-138387
Open

rcj1 wants to merge 2 commits into
dotnet:mainfrom
rcj1:fix-138387

Conversation

@rcj1

@rcj1 rcj1 commented Dec 2, 2026 •

Copy link
Copy Markdown
Contributor
  • Normalize oversized constant AdvSimd shift counts to the element width.
  • For oversized constant right shifts, we avoid the register-count instructions USHL and SSHL (and thus the need to have an oversized constant in a register). Instead, we emit immediate-count USHR and SSHR after clamping the count to the element width.
  • Clamp nonconstant counts before negation and broadcast, preventing signed-byte wraparound from reversing the shift direction.

Adds regression coverage for runtime counts 9, 128, and 255, plus literal 255 cases.

Fixes #138387

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: b53d3c92-88dc-48a6-a7d9-3e7d6d43a34c
@rcj1
rcj1 requested review from EgorBo and dhartglassMSFT December 2, 2026 00:01
@rcj1 rcj1 self-assigned this Dec 2, 2026
@github-actions github-actions Bot added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label Dec 2, 2026
@dotnet-policy-service

Copy link
Copy Markdown
Contributor

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

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI

Projects

None yet

1 participant