aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/AssignmentTrackingAnalysis.cpp
diff options
context:
space:
mode:
authorluxufan <luxufan@iscas.ac.cn>2023-03-03 16:34:17 +0800
committerluxufan <luxufan@iscas.ac.cn>2023-03-21 15:24:17 +0800
commit6beb371e4c469801e04711b81d27cde6da11b032 (patch)
tree6f5236f983c5602d9196ef7aa37cb10f94c91532 /llvm/lib/CodeGen/AssignmentTrackingAnalysis.cpp
parent9c93e728bfb8079c1de51e5481168c4083038c2a (diff)
downloadllvm-6beb371e4c469801e04711b81d27cde6da11b032.zip
llvm-6beb371e4c469801e04711b81d27cde6da11b032.tar.gz
llvm-6beb371e4c469801e04711b81d27cde6da11b032.tar.bz2
[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
Diffstat (limited to 'llvm/lib/CodeGen/AssignmentTrackingAnalysis.cpp')
0 files changed, 0 insertions, 0 deletions