[hw][dispatcher] Tag full vd..vd+nf for segment loads/stores#454
Open
sjalloq wants to merge 1 commit intopulp-platform:mainfrom
Open
[hw][dispatcher] Tag full vd..vd+nf for segment loads/stores#454sjalloq wants to merge 1 commit intopulp-platform:mainfrom
sjalloq wants to merge 1 commit intopulp-platform:mainfrom
Conversation
The per-vreg EEW tracker (eew_d[]) is updated when an instruction writes a destination vreg, but the existing loop only iterates over EMUL consecutive registers. Segment loads/stores write (NF+1)*EMUL consecutive vregs (vd, vd+1, ..., vd+nf at each EMUL group), so all but the base vd were left at the reset-default EW8. Fix: when the op is a segment load/store (VLE/VLSE/VLXE/VSE/VSSE/VSXE with nf != 0), extend the tracker update loop to cover (nf+1)*EMUL consecutive vregs. The bug was hidden in the existing rv64uv segment tests because VCLEAR (used as a defensive reset before each test) does `vmv.v.i v_reg, 0` at the test's vsew, which side-effects the EEW tracker into the matching state for v_reg. Tests that lack this pre-tagging surface the bug.
Author
|
This is the fix for #454 |
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.
The per-vreg EEW tracker (eew_d[]) is updated when an instruction writes a destination vreg, but the existing loop only iterates over EMUL consecutive registers. Segment loads/stores write (NF+1)*EMUL consecutive vregs (vd, vd+1, ..., vd+nf at each EMUL group), so all but the base vd were left at the reset-default EW8.
Fix: when the op is a segment load/store (VLE/VLSE/VLXE/VSE/VSSE/VSXE with nf != 0), extend the tracker update loop to cover (nf+1)*EMUL consecutive vregs.
The bug was hidden in the existing rv64uv segment tests because VCLEAR (used as a defensive reset before each test) does
vmv.v.i v_reg, 0at the test's vsew, which side-effects the EEW tracker into the matching state for v_reg. Tests that lack this pre-tagging surface the bug.Description of PR that completes issue here...
Changelog
Fixed
Added
Changed
Checklist
Please check our contributing guidelines before opening a Pull Request.