Fix TBAA metadata for loads/stores with negative indices - #9310
Merged
Conversation
A predicated vector load with a negative stride is codegen'd as a dense load of the flipped ramp followed by a shuffle. If the load reaches the first element of the buffer, the flipped ramp starts before it, and the masked-off lanes give the ramp a negative base. add_tbaa_metadata asserted that the base was non-negative. The TBAA tree describes power-of-two-sized blocks aligned relative to the start of the buffer, so it can't name a range that straddles the start. Emit metadata only down to the buffer level in that case. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
alexreinking
approved these changes
Aug 10, 2026
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #9310 +/- ##
==========================================
- Coverage 69.79% 69.75% -0.04%
==========================================
Files 258 258
Lines 77956 77960 +4
Branches 18979 18980 +1
==========================================
- Hits 54410 54383 -27
+ Misses 17803 17795 -8
- Partials 5743 5782 +39 ☔ 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.
A predicated vector load with a negative stride is codegen'd as a dense load of the flipped ramp followed by a shuffle. If the load reaches the first element of the buffer, the flipped ramp starts before it, and the masked-off lanes give the ramp a negative base. add_tbaa_metadata asserted that the base was non-negative.
The TBAA tree describes power-of-two-sized blocks aligned relative to the start of the buffer, so it can't name a range that straddles the start. Emit metadata only down to the buffer level in that case.
Found while working on a fuzzer for sliding window schedules, but not actually related to sliding window.