-
Notifications
You must be signed in to change notification settings - Fork 13.5k
Missed transform: umin/umax/smin/smax
on i1
to and/or
#64537
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
Hi! This issue may be a good introductory issue for people new to working on LLVM. If you would like to work on this issue, your first steps are:
For more instructions on how to submit a patch to LLVM, see our documentation. If you have any further questions about this issue, don't hesitate to ask via a comment on this Github issue. @llvm/issue-subscribers-good-first-issue |
Hi there, |
I'd expect it'd probably get added inside InstCombinerImpl::visitCallInst for the smin/smax/umin/umax case:
A example of the fold for add (i1, i1) -> xor (i1, i1) can be found here:
|
@RKSimon I think I fixed it, how can I test the changes? |
Try |
@elhewaty Any luck with adding test coverage? |
hi @elhewaty any update of the patch? |
Hi @elhewaty, are you still working on this issue? If you don't mind, I'd like to take over. I wrote this patch as a practice: https://reviews.llvm.org/D158915. |
The patch has been landed: 1a65cd3fcf58. This issue can be closed. |
umin(i1, i1) => and
: https://alive2.llvm.org/ce/z/tRp7VKumax(i1, i1) => or
: https://alive2.llvm.org/ce/z/7nS6Wpsmin(i1, i1) => or
: https://alive2.llvm.org/ce/z/XXfBSksmax(i1, i1) => and
: https://alive2.llvm.org/ce/z/N9fqT2The text was updated successfully, but these errors were encountered: