Lines Matching refs:BO
95 bool strengthenRightShift(BinaryOperator *BO, Value *IVOperand);
731 bool SimplifyIndvar::strengthenOverflowingOperation(BinaryOperator *BO, in strengthenOverflowingOperation() argument
735 if (BO->hasNoUnsignedWrap() && BO->hasNoSignedWrap()) in strengthenOverflowingOperation()
740 switch (BO->getOpcode()) { in strengthenOverflowingOperation()
757 unsigned BitWidth = cast<IntegerType>(BO->getType())->getBitWidth(); in strengthenOverflowingOperation()
758 Type *WideTy = IntegerType::get(BO->getContext(), BitWidth * 2); in strengthenOverflowingOperation()
759 const SCEV *LHS = SE->getSCEV(BO->getOperand(0)); in strengthenOverflowingOperation()
760 const SCEV *RHS = SE->getSCEV(BO->getOperand(1)); in strengthenOverflowingOperation()
764 if (!BO->hasNoUnsignedWrap()) { in strengthenOverflowingOperation()
765 const SCEV *ExtendAfterOp = SE->getZeroExtendExpr(SE->getSCEV(BO), WideTy); in strengthenOverflowingOperation()
770 BO->setHasNoUnsignedWrap(); in strengthenOverflowingOperation()
771 SE->forgetValue(BO); in strengthenOverflowingOperation()
776 if (!BO->hasNoSignedWrap()) { in strengthenOverflowingOperation()
777 const SCEV *ExtendAfterOp = SE->getSignExtendExpr(SE->getSCEV(BO), WideTy); in strengthenOverflowingOperation()
782 BO->setHasNoSignedWrap(); in strengthenOverflowingOperation()
783 SE->forgetValue(BO); in strengthenOverflowingOperation()
794 bool SimplifyIndvar::strengthenRightShift(BinaryOperator *BO, in strengthenRightShift() argument
798 if (BO->getOpcode() == Instruction::Shl) { in strengthenRightShift()
801 for (auto *U : BO->users()) { in strengthenRightShift()
936 if (BinaryOperator *BO = dyn_cast<BinaryOperator>(UseInst)) { in simplifyUsers() local
937 if ((isa<OverflowingBinaryOperator>(BO) && in simplifyUsers()
938 strengthenOverflowingOperation(BO, IVOperand)) || in simplifyUsers()
939 (isa<ShlOperator>(BO) && strengthenRightShift(BO, IVOperand))) { in simplifyUsers()