Skip to content

Fix predicated load/store of one-lane vectors#8924

Merged
alexreinking merged 2 commits into
mainfrom
fix-one-lane-vectors
Feb 14, 2026
Merged

Fix predicated load/store of one-lane vectors#8924
alexreinking merged 2 commits into
mainfrom
fix-one-lane-vectors

Conversation

@alexreinking
Copy link
Copy Markdown
Member

Fixes #8922

@alexreinking alexreinking requested a review from abadams January 27, 2026 15:47
// This schedule creates a situation where f1 is computed with a
// vectorized loop that requires predicated loads/stores for the
// final single element.
f2.split(x, xo, xi, w);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't you explicitly select a Predicated tail strategy? Auto might select guard with if?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GuardWithIf currently generates a predicate, but yes it might be more future proof to use TailStrategy::Predicate here

// vectorized loop that requires predicated loads/stores for the
// final single element.
f2.split(x, xo, xi, w);
f1.compute_at(f2, xo).vectorize(x); // effective vector width = w + 1
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or in vectorize set the tail strategy?

@alexreinking alexreinking merged commit 10f3261 into main Feb 14, 2026
17 checks passed
@alexreinking alexreinking deleted the fix-one-lane-vectors branch February 14, 2026 07:02
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.

Error in CodeGen_LLVM with predicated load/store of 1-lane vectors

3 participants