-
Notifications
You must be signed in to change notification settings - Fork 12.5k
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
Weaken xor
to or
under nand
#58624
Comments
RKSimon
added
llvm:instcombine
missed-optimization
llvm:codegen
and removed
new issue
labels
Oct 26, 2022
Possibly a IR and DAG optimization candidate |
Maybe this pattern is more general. |
RKSimon
added a commit
that referenced
this issue
Oct 28, 2022
…bits Alive2: https://alive2.llvm.org/ce/z/7wvfns Part of Issue #58624
DAG was missing this fold, but instcombine does already perform it. What seems to be missing is any assumption cache handling inside llvm::haveNoCommonBitsSet |
Candidate Patch: https://reviews.llvm.org/D137021 |
virnarula
pushed a commit
to virnarula/llvm-project
that referenced
this issue
Nov 2, 2022
…bits Alive2: https://alive2.llvm.org/ce/z/7wvfns Part of Issue llvm#58624
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/tMGuKE
It's also possible that, for normalization, this shouldn't always happen, so here's my non-minimized example: https://alive2.llvm.org/ce/z/_c36CA
In that one, replacing the
xor
with anor
opened up a bunch of additional possibilities that ended up making a huge improvement in the generated assembly:The text was updated successfully, but these errors were encountered: