Skip to content

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

Open
alexreinking wants to merge 2 commits intomainfrom
fix-one-lane-vectors
Open

Fix predicated load/store of one-lane vectors#8924
alexreinking wants to merge 2 commits intomainfrom
fix-one-lane-vectors

Conversation

@alexreinking
Copy link
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
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
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
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?

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