Skip to content

Only use the even/odd/thirds lets for whole-vector extracts - #9363

Open
abadams wants to merge 3 commits into
mainfrom
abadams/deinterleave_partial_extract
Open

Only use the even/odd/thirds lets for whole-vector extracts#9363
abadams wants to merge 3 commits into
mainfrom
abadams/deinterleave_partial_extract

Conversation

@abadams

@abadams abadams commented Aug 19, 2026

Copy link
Copy Markdown
Member

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.

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>
Comment thread src/Deinterleave.cpp Outdated
Co-authored-by: Claude <noreply@anthropic.com>
@codecov

codecov Bot commented Aug 19, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 70.05%. Comparing base (bb5426d) to head (65b6b0b).
⚠️ Report is 3 commits behind head on main.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants