arm_v81m: model Cortex-M55 shifted operand latency - #464
Open
bremoran wants to merge 2 commits into
Open
Conversation
Charge one additional cycle when a producer feeds the shifted source operand of scalar ADD, EOR, ORR, AND, or BIC forms. Add regression coverage for shifted and unshifted operands. Signed-off-by: Brendan Moran <brendan.moran@arm.com>
bremoran
marked this pull request as draft
July 31, 2026 14:04
bremoran
marked this pull request as ready for review
August 3, 2026 06:56
Introduce a shared flexible-Operand2 instruction base and extend the shifted-source latency model to every relevant scalar instruction family. Use operand-aware dependency matching for the Cortex-M55 and Cortex-M85 models, and add parser, flag/dataflow, multi-output, and in/out producer coverage.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #463
Summary
Model the additional Cortex-M55 latency when a producer feeds the flexible
shifted-register Operand2 (
Rm) of scalar instructions.The model now covers all flexible Operand2 instruction families documented in
the Cortex-M55 Software Optimization Guide:
The latency remains unchanged when the producer feeds the unshifted operand.
PKHBT/PKHTB remain separate because they are fixed-latency packing
instructions, not flexible Operand2 forms.
A shared
ShiftedOperandInstructionbase class provides consistent parsing andoperand identification. The M55 and M85 target models use operand-aware
dependency matching, including multi-output and input/output producers.
Carry-flag and comparison/test flag semantics are covered explicitly.
Motivation
The previous implementation modeled only ADD, EOR, ORR, AND, and BIC because
those were sufficient for the Keccak scheduling workload. The instruction-set
reference defines the shifted Operand2 form more broadly, so the model should
represent the full instruction family rather than a workload-specific subset.
Performance evidence
The historical Keccak measurements motivating this change remain:
The Keccak input uses only the already-supported EOR and BIC shifted forms, so
the generalized model produces the same Keccak dependency latencies as the
previous implementation. New hardware measurements are not included in this
model-expansion PR.
Testing
-W errorflake8 .black --check --diff .git diff --check