[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: https://github.com/llvm/llvm-project/issues/61137 Differential Revision: https://reviews.llvm.org/D145223
Loading
Please sign in to comment