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 overflow in x86 absd lowering #7407

Merged
merged 2 commits into from
Mar 11, 2023
Merged

Conversation

abadams
Copy link
Member

@abadams abadams commented Mar 10, 2023

The existing code was codegenning an int32 replacement for an Expr of type uint32. One option was to cast the result to a uint32, but we want wrapping semantics on that subtract, so it's better to just do an unsigned subtraction.

This should fix the breakage with trunk llvm.

Copy link
Contributor

@steven-johnson steven-johnson left a comment

Choose a reason for hiding this comment

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

LGTM pending green

@steven-johnson steven-johnson merged commit 4bf660e into main Mar 11, 2023
@steven-johnson steven-johnson deleted the abadams/fix_absd_x86_lowering branch March 11, 2023 00:53
ardier pushed a commit to ardier/Halide-mutation that referenced this pull request Mar 3, 2024
* Fix overflow in x86 absd lowering

* Fix default lowering too
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.

2 participants