Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[xtensa] Fixed index conversion for gather_load with undefined ramp #8215

Merged
merged 1 commit into from
May 10, 2024

Conversation

Aelphy
Copy link
Contributor

@Aelphy Aelphy commented May 8, 2024

No description provided.

@Aelphy Aelphy changed the title Fixed index conversion for gather_load with undefined ramp [xtensa] Fixed index conversion for gather_load with undefined ramp May 8, 2024
@Aelphy Aelphy force-pushed the feature/gather_load_undefined_ramp branch from 1f5e0e1 to 9593fb4 Compare May 8, 2024 21:31
@steven-johnson steven-johnson requested a review from vksnk May 8, 2024 21:57
Copy link
Member

@vksnk vksnk left a comment

Choose a reason for hiding this comment

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

Undo Approve,

if (!op->type.is_vector() || op->index.as<Ramp>()) {
// If dense_ramp_base is not defined, gather_load will be used and thus, index conversion is needed.
Expr dense_ramp_base = strided_ramp_base(op->index, 1);
if (!op->type.is_vector() || !dense_ramp_base.defined()) {
Copy link
Member

Choose a reason for hiding this comment

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

I think this shouldn't be negated: if it's a dense ramp then we will use regular load so this transformation is not needed.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sorry, forgot to copy back after testing. Done.

@Aelphy Aelphy force-pushed the feature/gather_load_undefined_ramp branch from 9593fb4 to 9ad2f7d Compare May 8, 2024 22:38
@vksnk vksnk merged commit d61390a into xtensa-codegen May 10, 2024
3 checks passed
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.

None yet

2 participants