Lines Matching refs:Op0

177   Value *Op0 = I.getOperand(0), *Op1 = I.getOperand(1);  in visitMul()  local
182 if (Value *V = SimplifyMulInst(Op0, Op1, DL, TLI, DT, AC)) in visitMul()
190 BinaryOperator *BO = BinaryOperator::CreateNeg(Op0, I.getName()); in visitMul()
252 if (Op0->hasOneUse()) { in visitMul()
255 if (match(Op0, m_Sub(m_Value(Y), m_Value(X)))) in visitMul()
257 else if (match(Op0, m_Add(m_Value(Y), m_ConstantInt(C1)))) in visitMul()
271 if (SelectInst *SI = dyn_cast<SelectInst>(Op0)) in visitMul()
275 if (isa<PHINode>(Op0)) in visitMul()
283 if (match(Op0, m_OneUse(m_Add(m_Value(X), m_Constant(C1))))) { in visitMul()
293 if (Value *Op0v = dyn_castNegVal(Op0)) { // -X * -Y = X*Y in visitMul()
297 match(Op0, m_NSWSub(m_Value(), m_Value())) && in visitMul()
308 BinaryOperator *BO = dyn_cast<BinaryOperator>(Op0); in visitMul()
312 Op1C = Op0; in visitMul()
345 return BinaryOperator::CreateAnd(Op0, Op1); in visitMul()
353 if (match(Op0, m_Shl(m_One(), m_Value(Y)))) { in visitMul()
355 ShlNSW = cast<ShlOperator>(Op0)->hasNoSignedWrap(); in visitMul()
357 BO = BinaryOperator::CreateShl(Op0, Y); in visitMul()
377 if (MaskedValueIsZero(Op0, Negative2, 0, &I)) { in visitMul()
378 BoolCast = Op0; in visitMul()
382 OtherOp = Op0; in visitMul()
392 if (!I.hasNoSignedWrap() && WillNotOverflowSignedMul(Op0, Op1, I)) { in visitMul()
398 computeOverflowForUnsignedMul(Op0, Op1, &I) == in visitMul()
539 Value *Op0 = I.getOperand(0), *Op1 = I.getOperand(1); in visitFMul() local
544 if (isa<Constant>(Op0)) in visitFMul()
545 std::swap(Op0, Op1); in visitFMul()
548 SimplifyFMulInst(Op0, Op1, I.getFastMathFlags(), DL, TLI, DT, AC)) in visitFMul()
556 if (SelectInst *SI = dyn_cast<SelectInst>(Op0)) in visitFMul()
560 if (isa<PHINode>(Op0)) in visitFMul()
567 Instruction *RI = BinaryOperator::CreateFSub(NegZero, Op0); in visitFMul()
578 if (isFMulOrFDivWithConstant(Op0)) in visitFMul()
579 if (Value *V = foldFMulConst(cast<Instruction>(Op0), C, &I)) in visitFMul()
583 Instruction *FAddSub = dyn_cast<Instruction>(Op0); in visitFMul()
618 if (Op0 == Op1) { in visitFMul()
619 if (IntrinsicInst *II = dyn_cast<IntrinsicInst>(Op0)) { in visitFMul()
641 detectLog2OfHalf(Op0, OpY, Log2); in visitFMul()
647 OpX = Op0; in visitFMul()
663 Value *Opnd0 = Op0; in visitFMul()
804 Value *Op0 = I.getOperand(0), *Op1 = I.getOperand(1); in commonIDivTransforms() local
817 if (Instruction *LHS = dyn_cast<Instruction>(Op0)) { in commonIDivTransforms()
887 if (SelectInst *SI = dyn_cast<SelectInst>(Op0)) in commonIDivTransforms()
890 if (isa<PHINode>(Op0)) in commonIDivTransforms()
897 if (ConstantInt *One = dyn_cast<ConstantInt>(Op0)) { in commonIDivTransforms()
922 if (match(Op0, m_Sub(m_Value(X), m_Value(Z)))) { // (X - Z) / Y; Y = Op1 in commonIDivTransforms()
947 typedef Instruction *(*FoldUDivOperandCb)(Value *Op0, Value *Op1,
974 static Instruction *foldUDivPow2Cst(Value *Op0, Value *Op1, in foldUDivPow2Cst() argument
978 Op0, ConstantInt::get(Op0->getType(), C.logBase2())); in foldUDivPow2Cst()
985 static Instruction *foldUDivNegCst(Value *Op0, Value *Op1, in foldUDivNegCst() argument
987 Value *ICI = IC.Builder->CreateICmpULT(Op0, cast<ConstantInt>(Op1)); in foldUDivNegCst()
994 static Instruction *foldUDivShl(Value *Op0, Value *Op1, const BinaryOperator &I, in foldUDivShl() argument
1007 BinaryOperator *LShr = BinaryOperator::CreateLShr(Op0, N); in foldUDivShl()
1017 static size_t visitUDivOperand(Value *Op0, Value *Op1, const BinaryOperator &I, in visitUDivOperand() argument
1047 visitUDivOperand(Op0, SI->getOperand(1), I, Actions, Depth)) in visitUDivOperand()
1048 if (visitUDivOperand(Op0, SI->getOperand(2), I, Actions, Depth)) { in visitUDivOperand()
1057 Value *Op0 = I.getOperand(0), *Op1 = I.getOperand(1); in visitUDiv() local
1062 if (Value *V = SimplifyUDivInst(Op0, Op1, DL, TLI, DT, AC)) in visitUDiv()
1073 if (match(Op0, m_LShr(m_Value(X), m_APInt(C1))) && in visitUDiv()
1078 bool IsExact = I.isExact() && match(Op0, m_Exact(m_Value())); in visitUDiv()
1089 if (ZExtInst *ZOp0 = dyn_cast<ZExtInst>(Op0)) in visitUDiv()
1097 if (visitUDivOperand(Op0, Op1, I, UDivActions)) in visitUDiv()
1103 Inst = Action(Op0, ActionOp1, I, *this); in visitUDiv()
1130 Value *Op0 = I.getOperand(0), *Op1 = I.getOperand(1); in visitSDiv() local
1135 if (Value *V = SimplifySDivInst(Op0, Op1, DL, TLI, DT, AC)) in visitSDiv()
1146 return BinaryOperator::CreateNeg(Op0); in visitSDiv()
1151 return BinaryOperator::CreateExactAShr(Op0, ShAmt, I.getName()); in visitSDiv()
1158 if (match(Op0, m_OneUse(m_SExt(m_Value(Op0Src)))) && in visitSDiv()
1168 return new SExtInst(NarrowOp, Op0->getType()); in visitSDiv()
1175 return new ZExtInst(Builder->CreateICmpEQ(Op0, Op1), I.getType()); in visitSDiv()
1179 if (match(Op0, m_NSWSub(m_Zero(), m_Value(X)))) { in visitSDiv()
1190 if (MaskedValueIsZero(Op0, Mask, 0, &I)) { in visitSDiv()
1193 auto *BO = BinaryOperator::CreateUDiv(Op0, Op1, I.getName()); in visitSDiv()
1203 auto *BO = BinaryOperator::CreateUDiv(Op0, Op1, I.getName()); in visitSDiv()
1244 Value *Op0 = I.getOperand(0), *Op1 = I.getOperand(1); in visitFDiv() local
1249 if (Value *V = SimplifyFDivInst(Op0, Op1, I.getFastMathFlags(), in visitFDiv()
1253 if (isa<Constant>(Op0)) in visitFDiv()
1262 if (SelectInst *SI = dyn_cast<SelectInst>(Op0)) in visitFDiv()
1272 if (match(Op0, m_FMul(m_Value(X), m_Constant(C1)))) { in visitFDiv()
1278 } else if (match(Op0, m_FDiv(m_Value(X), m_Constant(C1)))) { in visitFDiv()
1296 if (Instruction *T = CvtFDivConstToReciprocal(Op0, Op1C, AllowReciprocal)) { in visitFDiv()
1304 if (AllowReassociate && isa<Constant>(Op0)) { in visitFDiv()
1305 Constant *C1 = cast<Constant>(Op0), *C2; in visitFDiv()
1336 if (Op0->hasOneUse() && match(Op0, m_FDiv(m_Value(X), m_Value(Y)))) { in visitFDiv()
1343 Flags &= cast<Instruction>(Op0)->getFastMathFlags(); in visitFDiv()
1351 if (!isa<Constant>(Y) || !isa<Constant>(Op0)) { in visitFDiv()
1352 NewInst = Builder->CreateFMul(Op0, Y); in visitFDiv()
1378 Value *Op0 = I.getOperand(0), *Op1 = I.getOperand(1); in commonIRemTransforms() local
1391 if (Instruction *Op0I = dyn_cast<Instruction>(Op0)) { in commonIRemTransforms()
1419 Value *Op0 = I.getOperand(0), *Op1 = I.getOperand(1); in visitURem() local
1424 if (Value *V = SimplifyURemInst(Op0, Op1, DL, TLI, DT, AC)) in visitURem()
1431 if (ZExtInst *ZOp0 = dyn_cast<ZExtInst>(Op0)) in visitURem()
1440 return BinaryOperator::CreateAnd(Op0, Add); in visitURem()
1444 if (match(Op0, m_One())) { in visitURem()
1445 Value *Cmp = Builder->CreateICmpNE(Op1, Op0); in visitURem()
1454 Value *Op0 = I.getOperand(0), *Op1 = I.getOperand(1); in visitSRem() local
1459 if (Value *V = SimplifySRemInst(Op0, Op1, DL, TLI, DT, AC)) in visitSRem()
1481 MaskedValueIsZero(Op0, Mask, 0, &I)) { in visitSRem()
1483 return BinaryOperator::CreateURem(Op0, Op1, I.getName()); in visitSRem()
1529 Value *Op0 = I.getOperand(0), *Op1 = I.getOperand(1); in visitFRem() local
1534 if (Value *V = SimplifyFRemInst(Op0, Op1, I.getFastMathFlags(), in visitFRem()