-
Notifications
You must be signed in to change notification settings - Fork 13.6k
[InstCombine] fold select of select with common argument #82350
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
Comments
some examples from real code:
|
Are these transformations generally profitable? In a quick test they seem to generate the same number of instructions on X86, and more instructions on AArch64. |
there's an existing fold when the common arg is on same hand of the selects, should be possible to extend? llvm-project/llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp Lines 3652 to 3655 in 2c5d01c
|
I think these can be handled by #83739. |
Sorry for the noise. The inner select is not in the expected arm :( |
Uh oh!
There was an error while loading. Please reload this page.
fold other select to logical and/or if either icmp predicate is free to invert
https://alive2.llvm.org/ce/z/aSYXfg
The text was updated successfully, but these errors were encountered: