Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[InstCombine] Combine binary operator of two phi node
Combine binary operator of two phi node if there is at least one specific constant value in phi0 and phi1's incoming values for each same incoming block and this specific constant value can be used to do optimization for specific binary operator. For example: ``` %phi0 = phi i32 [0, %bb0], [%i, %bb1] %phi1 = phi i32 [%j, %bb0], [0, %bb1] %add = add i32 %phi0, %phi1 ==> %add = phi i32 [%j, %bb0], [%i, %bb1] ``` Fixes: #61137 Differential Revision: https://reviews.llvm.org/D145223
- Loading branch information
luxufan
committed
Mar 21, 2023
1 parent
9c93e72
commit 6beb371
Showing
2 changed files
with
75 additions
and
15 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