[PATCH] D145223: [InstCombine] Combine binary operator of two phi node
Aditya Kumar via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 17 07:53:11 PDT 2023
hiraditya added inline comments.
================
Comment at: llvm/lib/Transforms/InstCombine/InstructionCombining.cpp:1297
if (!Phi0 || !Phi1 || !Phi0->hasOneUse() || !Phi1->hasOneUse() ||
- Phi0->getNumOperands() != 2 || Phi1->getNumOperands() != 2)
+ Phi0->getNumOperands() != Phi1->getNumOperands())
return nullptr;
----------------
D
================
Comment at: llvm/lib/Transforms/InstCombine/InstructionCombining.cpp:1314
+ // %add = phi i32 [%j, %bb0], [%i, %bb1]
+ // TODO: Support other binary operators
+ Constant *C = ConstantExpr::getBinOpIdentity(BO.getOpcode(), BO.getType(),
----------------
nit: any remaining operators we are still missing?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D145223/new/
https://reviews.llvm.org/D145223
More information about the llvm-commits
mailing list