-
Notifications
You must be signed in to change notification settings - Fork 13.5k
clang is suboptimal for (~a ^ b) < ~a
#69803
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
I am working on this. |
That is incorrect. In summary:
In this case, you should start with |
@nikic @goldsteinn @arsenm @dtcxzyw candidate pull: #69882 |
The way GCC handles this is a Canonicalization of |
LLVM doesn't canonicalize |
- [InstCombine] Add test coverage for comparisons of operands including one-complemented oparands(NFC). - [InstCombine] Fold xored one-complemented operand comparisons. Alive2: https://alive2.llvm.org/ce/z/PZMJeB Fixes #69803.
…9882) - [InstCombine] Add test coverage for comparisons of operands including one-complemented oparands(NFC). - [InstCombine] Fold xored one-complemented operand comparisons. Alive2: https://alive2.llvm.org/ce/z/PZMJeB Fixes llvm#69803.
Consider the following two functions:
Clang vs GCC:
https://godbolt.org/z/rxK1nr794
Alive2:
https://alive2.llvm.org/ce/z/aUhKRe
The text was updated successfully, but these errors were encountered: