forked from llvm/llvm-project
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[InstCombine] fold signed absolute diff patterns
This overlaps partially with the codegen patch D144789. This needs no-wrap for correctness, and I'm not sure if there's an unsigned equivalent: https://alive2.llvm.org/ce/z/ErmQ-9 https://alive2.llvm.org/ce/z/mr-c_A This is obviously an improvement in IR, and it looks like a codegen win for all targets and data types that I sampled. The 'nabs' case is left as a potential follow-up (and seems less likely to occur in real code). Differential Revision: https://reviews.llvm.org/D145073
- Loading branch information
1 parent
870e6b6
commit 74a5849
Showing
2 changed files
with
92 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters