Skip to content

[ConstraintElim] Pick NUWSub fix. #7925

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

Merged
merged 3 commits into from
Jan 3, 2024
Merged

Conversation

fhahn
Copy link

@fhahn fhahn commented Jan 3, 2024

No description provided.

fhahn added 3 commits January 3, 2024 13:28
The current patterns for NUWSub decompositions do not handle negative
constants correctly at the moment (causing llvm#76713).

Replace the incorrect pattern by more general code that recursively
decomposes the operands and then combines the results. This is already
done in most other places that handle operators like add/mul.

This means we fall back to the general constant handling code (fixes the
mis-compile) while also being able to support reasoning about
decomposable expressions in the SUB operands.

Fixes llvm#76713.

(cherry-picked from 3c127e8)
@fhahn
Copy link
Author

fhahn commented Jan 3, 2024

@swift-ci please test

@fhahn
Copy link
Author

fhahn commented Jan 3, 2024

@swift-ci please test llvm

@fhahn fhahn merged commit 229f631 into swiftlang:stable/20230725 Jan 3, 2024
@fhahn fhahn deleted the ce-sub-fix branch January 3, 2024 20:52
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.

1 participant