Lines Matching refs:Sub
863 if (TheNeg->getOpcode() == Instruction::Sub) { in NegateValue()
941 for (auto Op : {Instruction::Add, Instruction::Sub, Instruction::Mul, in shouldConvertOrWithNoCommonBitsToAdd()
977 static bool ShouldBreakUpSubtract(Instruction *Sub) { in ShouldBreakUpSubtract() argument
979 if (match(Sub, m_Neg(m_Value())) || match(Sub, m_FNeg(m_Value()))) in ShouldBreakUpSubtract()
983 if (isa<UndefValue>(Sub->getOperand(1))) in ShouldBreakUpSubtract()
988 Value *V0 = Sub->getOperand(0); in ShouldBreakUpSubtract()
990 isReassociableOp(V0, Instruction::Sub, Instruction::FSub)) in ShouldBreakUpSubtract()
992 Value *V1 = Sub->getOperand(1); in ShouldBreakUpSubtract()
994 isReassociableOp(V1, Instruction::Sub, Instruction::FSub)) in ShouldBreakUpSubtract()
996 Value *VB = Sub->user_back(); in ShouldBreakUpSubtract()
997 if (Sub->hasOneUse() && in ShouldBreakUpSubtract()
999 isReassociableOp(VB, Instruction::Sub, Instruction::FSub))) in ShouldBreakUpSubtract()
1007 static BinaryOperator *BreakUpSubtract(Instruction *Sub, in BreakUpSubtract() argument
1014 Value *NegVal = NegateValue(Sub->getOperand(1), Sub, ToRedo); in BreakUpSubtract()
1016 CreateAdd(Sub->getOperand(0), NegVal, "", Sub->getIterator(), Sub); in BreakUpSubtract()
1017 Sub->setOperand(0, Constant::getNullValue(Sub->getType())); // Drop use of op. in BreakUpSubtract()
1018 Sub->setOperand(1, Constant::getNullValue(Sub->getType())); // Drop use of op. in BreakUpSubtract()
1019 New->takeName(Sub); in BreakUpSubtract()
1022 Sub->replaceAllUsesWith(New); in BreakUpSubtract()
1023 New->setDebugLoc(Sub->getDebugLoc()); in BreakUpSubtract()
2200 if (I->getOpcode() == Instruction::Sub) { in OptimizeInst()
2273 cast<Instruction>(BO->user_back())->getOpcode() == Instruction::Sub) in OptimizeInst()