Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[InstCombine] Make
FoldOpIntoSelect
handle non-constants and use co…
…ndition to deduce constants. Make the fold use the information present in the condition for deducing constants i.e: ``` %c = icmp eq i8 %x, 10 %s = select i1 %c, i8 3, i8 2 %r = mul i8 %x, %s ``` If we fold the `mul` into the select, on the true side we insert `10` for `%x` in the `mul`. Reviewed By: nikic Differential Revision: https://reviews.llvm.org/D146349
- Loading branch information
1 parent
db0706b
commit 82f0827
Showing
2 changed files
with
25 additions
and
17 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