Only use the even/odd/thirds lets for whole-vector extracts - #9363
Open
abadams wants to merge 3 commits into
Open
Only use the even/odd/thirds lets for whole-vector extracts#9363abadams wants to merge 3 commits into
abadams wants to merge 3 commits into
Conversation
rewrite_interleavings gives each vector let a pair of extra lets holding its even and odd lanes (or three holding every third lane). Those hold half or a third as many lanes as the let they come from, so a deinterleave asking for any other number of lanes must not be rewritten to use them. visit(Shuffle) reaches exactly that case: when it extracts a single lane it narrows starting_lane but leaves lane_stride and new_lanes alone, so recursing into a vector of a different width leaves the two out of sync. The result was a variable bound to a value of the wrong type. Co-authored-by: Claude <noreply@anthropic.com>
alexreinking
approved these changes
Aug 19, 2026
Co-authored-by: Claude <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #9363 +/- ##
==========================================
- Coverage 70.08% 70.05% -0.03%
==========================================
Files 259 259
Lines 79158 79160 +2
Branches 19293 19294 +1
==========================================
- Hits 55477 55458 -19
- Misses 17886 17906 +20
- Partials 5795 5796 +1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
rewrite_interleavings gives each vector let a pair of extra lets holding its even and odd lanes (or three holding every third lane). Those hold half or a third as many lanes as the let they come from, so a deinterleave asking for any other number of lanes must not be rewritten to use them.
visit(Shuffle) reaches exactly that case: when it extracts a single lane it narrows starting_lane but leaves lane_stride and new_lanes alone, so recursing into a vector of a different width leaves the two out of sync. The result was a variable bound to a value of the wrong type.
This path is apparently not reachable directly from front-end code, but it's a latent bug that popped up when I started messing with the simplifier.