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

Fix bug in mul_shift_right matching #6610

Merged
merged 2 commits into from
Feb 10, 2022
Merged

Conversation

abadams
Copy link
Member

@abadams abadams commented Feb 8, 2022

widening_mul handles mixed-signedness args, but mul_shift_right doesn't.
We shouldn't map a mixed-signedness widening_mul to a mul_shift_right.

widening_mul handles mixed-signedness args, but mul_shift_right doesn't.
We shouldn't map a mixed-signedness widening_mul to a mul_shift_right.
@abadams abadams added bug backport me This change should be backported to release versions labels Feb 8, 2022
@@ -384,6 +384,7 @@ class FindIntrinsics : public IRMutator {
auto is_x_same_int = op->type.is_int() && is_int(x, bits);
auto is_x_same_uint = op->type.is_uint() && is_uint(x, bits);
auto is_x_same_int_or_uint = is_x_same_int || is_x_same_uint;
auto x_y_same_sign = (is_int(x) && is_int(y)) || (is_uint(x) && is_uint(y));
Copy link
Contributor

Choose a reason for hiding this comment

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

I think a comment here would help-- it's not necessarily clear at first glance what is_int() means compared to Type::is_int()

@abadams
Copy link
Member Author

abadams commented Feb 10, 2022

Failure unrelated.

@abadams abadams merged commit 340f8f2 into master Feb 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport me This change should be backported to release versions bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants