-
Notifications
You must be signed in to change notification settings - Fork 12.1k
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
[InstCombine] InstCombine gets stuck when simplifying selects #83127
Labels
Comments
Another reproducer: https://godbolt.org/z/7MEYTe9cq
|
Third reproducer: https://godbolt.org/z/8f8b4xved
|
A simpler testcase:
@nikic I have no idea how to fix it in |
@nikic Ping. |
nikic
added a commit
to nikic/llvm-project
that referenced
this issue
Mar 5, 2024
When replacing with a non-constant, it's possible that the result of the simplification is actually more complicated than the original, and may result in an infinite combine loop. Mitigate the issue by requiring that either the replacement or simplification result is constant, which should ensure that it's simpler. This is a very simple check that doesn't seem to cause many regressions in our own tests, so let's see if it's good enough. Fixes llvm#83127.
nikic
added a commit
that referenced
this issue
Mar 6, 2024
When replacing with a non-constant, it's possible that the result of the simplification is actually more complicated than the original, and may result in an infinite combine loop. Mitigate the issue by requiring that either the replacement or simplification result is constant, which should ensure that it's simpler. While this check is crude, it does not appear to cause optimization regressions in real-world code in practice. Fixes #83127.
llvmbot
pushed a commit
to llvmbot/llvm-project
that referenced
this issue
Mar 6, 2024
When replacing with a non-constant, it's possible that the result of the simplification is actually more complicated than the original, and may result in an infinite combine loop. Mitigate the issue by requiring that either the replacement or simplification result is constant, which should ensure that it's simpler. While this check is crude, it does not appear to cause optimization regressions in real-world code in practice. Fixes llvm#83127. (cherry picked from commit 9f45c5e)
llvmbot
pushed a commit
to llvmbot/llvm-project
that referenced
this issue
Mar 11, 2024
When replacing with a non-constant, it's possible that the result of the simplification is actually more complicated than the original, and may result in an infinite combine loop. Mitigate the issue by requiring that either the replacement or simplification result is constant, which should ensure that it's simpler. While this check is crude, it does not appear to cause optimization regressions in real-world code in practice. Fixes llvm#83127. (cherry picked from commit 9f45c5e)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Reduced test case: https://godbolt.org/z/ds9eq96db
The text was updated successfully, but these errors were encountered: