-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
manual popcnt has unnecessary cmove since clang 16.0.0 #62450
Comments
We probably need to switch the select value equivalence fold to perform operand replacement ignoring poison flags/metadata and then drop them, rather than the current hack of trying to drop and restore flags (which doesn't cover the metadata case). |
@llvm/issue-subscribers-backend-x86 |
In case it helps, the extra
Making the variables This happens even with (Related: lzcnt/tzcnt have a false output dependency that's fixed in Skylake. And |
Code:
On x86-64 clang 16.0.0 as well as trunk (17.0.0 d7fa921) with
-O -march=haswell
compiles to:(Note the unnecessary cmove)
On clang 15.0.0 with the same options:
Reproducer
The text was updated successfully, but these errors were encountered: