Home | History | Annotate | Download | only in Scalar

Lines Matching refs:Sub

724     // Not the last operation.  The left-hand side will be a sub-expression
867 static bool ShouldBreakUpSubtract(Instruction *Sub) {
869 if (BinaryOperator::isNeg(Sub))
874 if (isReassociableOp(Sub->getOperand(0), Instruction::Add) ||
875 isReassociableOp(Sub->getOperand(0), Instruction::Sub))
877 if (isReassociableOp(Sub->getOperand(1), Instruction::Add) ||
878 isReassociableOp(Sub->getOperand(1), Instruction::Sub))
880 if (Sub->hasOneUse() &&
881 (isReassociableOp(Sub->use_back(), Instruction::Add) ||
882 isReassociableOp(Sub->use_back(), Instruction::Sub)))
891 static BinaryOperator *BreakUpSubtract(Instruction *Sub) {
892 // Convert a subtract into an add and a neg instruction. This allows sub
895 // Calculate the negative value of Operand 1 of the sub instruction,
898 Value *NegVal = NegateValue(Sub->getOperand(1), Sub);
900 BinaryOperator::CreateAdd(Sub->getOperand(0), NegVal, "", Sub);
901 Sub->setOperand(0, Constant::getNullValue(Sub->getType())); // Drop use of op.
902 Sub->setOperand(1, Constant::getNullValue(Sub->getType())); // Drop use of op.
903 New->takeName(Sub);
906 Sub->replaceAllUsesWith(New);
907 New->setDebugLoc(Sub->getDebugLoc());
1429 // intermediate stages into minimal multiply DAGs with perfect sub-expression
1560 if (I->getOpcode() == Instruction::Sub) {
1590 // If this is an add tree that is used by a sub instruction, ignore it
1593 cast<Instruction>(BO->use_back())->getOpcode() == Instruction::Sub)