-
Notifications
You must be signed in to change notification settings - Fork 10.8k
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] Missed optimization: fold select if the user of its select user indicates the condition #83225
Comments
vfdff
added a commit
to vfdff/llvm-project
that referenced
this issue
Feb 29, 2024
Fold select if the user of its select user indicates the condition Fix llvm#83225
vfdff
added a commit
to vfdff/llvm-project
that referenced
this issue
Mar 1, 2024
Fold select if the user of its select user indicates the condition Fix llvm#83225
vfdff
added a commit
to vfdff/llvm-project
that referenced
this issue
Mar 9, 2024
Fold select if the user of its select user indicates the condition Fix llvm#83225
should also support float type, https://alive2.llvm.org/ce/z/3Uaiis |
nikic
added a commit
to nikic/llvm-project
that referenced
this issue
Mar 18, 2024
The select equivalence fold takes a select like "X == Y ? A : B" and then tries to simplify A based on the known equality. This patch also uses it for the case were we have just "C ? A : B" by treating the condition as either "C == 1" or "C != 1". This is intended as an alternative to llvm#83405 for fixing llvm#83225.
vfdff
added a commit
to vfdff/llvm-project
that referenced
this issue
Mar 25, 2024
Fold select if the user of its select user indicates the condition Fix llvm#83225
vfdff
added a commit
to vfdff/llvm-project
that referenced
this issue
Mar 27, 2024
Fold select if the user of its select user indicates the condition Fix llvm#83225
vfdff
added a commit
to vfdff/llvm-project
that referenced
this issue
Mar 27, 2024
Fold select if the user of its select user indicates the condition Fix llvm#83225
vfdff
added a commit
to vfdff/llvm-project
that referenced
this issue
May 13, 2024
vfdff
added a commit
to vfdff/llvm-project
that referenced
this issue
May 13, 2024
Fold select if the user of its select user indicates the condition Fix llvm#83225
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Alive2 proof: https://alive2.llvm.org/ce/z/EDjfon
Motivating example
can be folded to:
Real-world motivation
This snippet of IR is derived from libdeflate/lib/crc32.c@dispatch_crc32 (after O3 pipeline, original IR comes from llvm-opt-benchmark).
The example above is a reduced version. If you're interested in the original suboptimal IR and optimal IR, see also:https://godbolt.org/z/rjf9zWM81
Let me know if you can confirm that it's an optimization opportunity, thanks.
The text was updated successfully, but these errors were encountered: