-
Notifications
You must be signed in to change notification settings - Fork 11.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[InstCombine] Optimize and of icmps with power-of-2 and contiguous masks
Add an instance combine optimization for expressions of the form: (%arg u< C1) & ((%arg & C2) != C2) -> %arg u< C2 Where C1 is a power-of-2 and C2 is a contiguous mask starting 1 bit below C1. This commit resolves GitHub missed-optimization issue #54856. Validation of scalar tests: - https://alive2.llvm.org/ce/z/JfKjiU - https://alive2.llvm.org/ce/z/AruHY_ - https://alive2.llvm.org/ce/z/JAiR6t - https://alive2.llvm.org/ce/z/S2X2e5 - https://alive2.llvm.org/ce/z/4cycdE - https://alive2.llvm.org/ce/z/NcDiLP Validation of vector tests: - https://alive2.llvm.org/ce/z/ABY6tE - https://alive2.llvm.org/ce/z/BTJi3s - https://alive2.llvm.org/ce/z/3BKWpu - https://alive2.llvm.org/ce/z/RrAbkj - https://alive2.llvm.org/ce/z/nM6fsN Reviewed By: goldstein.w.n Differential Revision: https://reviews.llvm.org/D125717
- Loading branch information
Showing
3 changed files
with
137 additions
and
96 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
Oops, something went wrong.