-
Notifications
You must be signed in to change notification settings - Fork 10.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[InstCombine] Fold binop of
select
and cast of select
condition
Simplify binary operations, whose operands involve a `select` instruction and a cast of the `select` condition. Specifically, the binop is canonicalized into a `select` with folded arguments as follows: (Binop (zext C), (select C, T, F)) -> (select C, (binop 1, T), (binop 0, F)) (Binop (sext C), (select C, T, F)) -> (select C, (binop -1, T), (binop 0, F)) Proofs: https://alive2.llvm.org/ce/z/c_JwwM Differential Revision: https://reviews.llvm.org/D153963
- Loading branch information
1 parent
c9fd7ac
commit f12a556
Showing
5 changed files
with
98 additions
and
45 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
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
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