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
[InstCombine] reduce test-for-overflow of shifted value #57338
Comments
@llvm/issue-subscribers-good-first-issue |
I would like to take a look at this as my first issue! |
Sounds good. Your solution should be flexible enough to handle patterns where the icmp operands are swapped and also when the icmp predicate is inverted. If you have questions, post here or post a patch to Phabricator and ask there. I am "spatel" on Phabricator if you want to add me as a reviewer. |
See also #51889 |
I spent some time getting a better understanding of this issue. Basically, we want to reduce Similarly, Are there any other patterns I'm missing? My next step is to find the best place in Any feedbacks, comments and suggestions are much appreciated! |
Test all of the unsigned predicates and see if there is a pattern. For example We can also reduce equality predicates: |
Also, you can look at the related bug (#51889) and the patch that was proposed to solve it to get ideas about where in InstCombineCompares to add code. |
Proposed fix: https://reviews.llvm.org/D132888 |
Forking this off from #57330:
https://alive2.llvm.org/ce/z/sTrumT
The text was updated successfully, but these errors were encountered: