Lines Matching refs:BO

168     if (auto *BO = dyn_cast<BinaryOperator>(Op)) {  in tryMAddReplacement()  local
169 if (BO->getParent() == Mul->getParent() && in tryMAddReplacement()
170 IsFreeTruncation(BO->getOperand(0)) && in tryMAddReplacement()
171 IsFreeTruncation(BO->getOperand(1)) && in tryMAddReplacement()
362 const auto *BO = dyn_cast<BinaryOperator>(EE.getVectorOperand()); in matchAddReduction() local
363 if (!BO || BO->getOpcode() != Instruction::Add || !BO->hasOneUse()) in matchAddReduction()
365 if (EE.getParent() != BO->getParent()) in matchAddReduction()
368 unsigned NumElems = cast<FixedVectorType>(BO->getType())->getNumElements(); in matchAddReduction()
373 const Value *Op = BO; in matchAddReduction()
376 const auto *BO = dyn_cast<BinaryOperator>(Op); in matchAddReduction() local
377 if (!BO || BO->getOpcode() != Instruction::Add) in matchAddReduction()
379 if (EE.getParent() != BO->getParent()) in matchAddReduction()
384 if (i != 0 && !BO->hasNUses(2)) in matchAddReduction()
387 Value *LHS = BO->getOperand(0); in matchAddReduction()
388 Value *RHS = BO->getOperand(1); in matchAddReduction()
416 static bool isReachableFromPHI(PHINode *Phi, BinaryOperator *BO) { in isReachableFromPHI() argument
422 if (U == BO) in isReachableFromPHI()
425 while (U->hasOneUse() && U->getOpcode() == BO->getOpcode()) in isReachableFromPHI()
428 return U == BO; in isReachableFromPHI()
457 if (auto *BO = dyn_cast<BinaryOperator>(V)) { in collectLeaves() local
458 if (BO->getOpcode() == Instruction::Add) { in collectLeaves()
460 if (BO->hasNUses(BO == Root ? 2 : 1)) { in collectLeaves()
461 append_range(Worklist, BO->operands()); in collectLeaves()
467 if (BO->hasNUses(BO == Root ? 3 : 2)) { in collectLeaves()
469 for (auto *U : BO->users()) in collectLeaves()
480 if (!isReachableFromPHI(PN, BO)) in collectLeaves()
484 append_range(Worklist, BO->operands()); in collectLeaves()