Lines Matching refs:Op1

400   Value *Op1 = FirstShiftIsOp1 ? NewShift2 : NewShift1;  in foldShiftOfShiftedBinOp()  local
402 return BinaryOperator::Create(BinInst->getOpcode(), Op1, Op2); in foldShiftOfShiftedBinOp()
409 Value *Op0 = I.getOperand(0), *Op1 = I.getOperand(1); in commonShiftTransforms() local
410 assert(Op0->getType() == Op1->getType()); in commonShiftTransforms()
415 if (match(Op1, m_OneUse(m_SExt(m_Value(Y))))) { in commonShiftTransforms()
416 Value *NewExt = Builder.CreateZExt(Y, Ty, Op1->getName()); in commonShiftTransforms()
426 if (SelectInst *SI = dyn_cast<SelectInst>(Op1)) in commonShiftTransforms()
430 if (Constant *CUI = dyn_cast<Constant>(Op1)) in commonShiftTransforms()
443 match(Op1, m_NUWAddLike(m_Value(A), m_Constant(C1)))) { in commonShiftTransforms()
463 if (match(Op0, m_APInt(AC)) && match(Op1, m_Add(m_Value(A), m_APInt(AddC))) && in commonShiftTransforms()
499 if (Op1->hasOneUse() && match(Op1, m_SRem(m_Value(A), m_Constant(C))) && in commonShiftTransforms()
504 Value *Rem = Builder.CreateAnd(A, Mask, Op1->getName()); in commonShiftTransforms()
511 if (match(Op1, m_Or(m_Value(), m_SpecificInt(BitWidth - 1)))) in commonShiftTransforms()
1035 Value *Op0 = I.getOperand(0), *Op1 = I.getOperand(1); in visitShl() local
1040 if (match(Op1, m_APInt(C))) { in visitShl()
1054 if (match(Op0, m_Shr(m_Value(X), m_Specific(Op1)))) { in visitShl()
1162 (match(Y, m_Shr(m_Value(), m_Specific(Op1))) || in visitShl()
1163 match(Y, m_And(m_OneUse(m_Shr(m_Value(), m_Specific(Op1))), in visitShl()
1168 if (match(Shr, m_OneUse(m_Shr(m_Value(X), m_Specific(Op1))))) { in visitShl()
1170 Value *YS = Builder.CreateShl(Y, Op1, Op0BO->getName()); in visitShl()
1182 m_OneUse(m_And(m_OneUse(m_Shr(m_Value(X), m_Specific(Op1))), in visitShl()
1185 Value *YS = Builder.CreateShl(Y, Op1, Op0BO->getName()); in visitShl()
1200 Value *NewShift = Builder.CreateShl(X, Op1); in visitShl()
1211 if (match(Op0, m_OneUse(m_Shr(m_Value(X), m_Specific(Op1))))) { in visitShl()
1213 Value *Mask = Builder.CreateShl(AllOnes, Op1); in visitShl()
1218 if (match(Op0, m_LShr(m_AllOnes(), m_Specific(Op1)))) { in visitShl()
1220 return BinaryOperator::CreateShl(AllOnes, Op1); in visitShl()
1224 if (match(Op1, m_ImmConstant(C1))) { in visitShl()
1240 if (match(Op1, m_Sub(m_SpecificInt(BitWidth - 1), m_Value(X)))) in visitShl()
1246 if (match(Op1, in visitShl()
1267 Value *Op0 = I.getOperand(0), *Op1 = I.getOperand(1); in visitLShr() local
1275 match(Op1, m_SpecificIntAllowPoison(BitWidth - 1))) in visitLShr()
1281 match(Op0, m_OneUse(m_NUWSub(m_NUWShl(m_Value(X), m_Specific(Op1)), in visitLShr()
1283 Value *NewLshr = Builder.CreateLShr(Y, Op1, "", /*isExact=*/true); in visitLShr()
1291 if (match(Op0, m_Add(m_Value(X), m_Value(Y))) && match(Op1, m_One()) && in visitLShr()
1299 m_NUWShl(m_Value(Y), m_Specific(Op1)))))) { in visitLShr()
1300 Value *NewLshr = Builder.CreateLShr(X, Op1, "", /*isExact=*/true); in visitLShr()
1322 if (match(Op0, m_OneUse(m_c_BinOp(m_NUWShl(m_Value(X), m_Specific(Op1)), in visitLShr()
1329 Y, Op1, "", I.isExact() && Op0OB->getOpcode() != Instruction::And); in visitLShr()
1343 if (match(Op1, m_APInt(C))) { in visitLShr()
1404 m_OneUse(m_c_Add(m_OneUse(m_Shl(m_Value(X), m_Specific(Op1))), in visitLShr()
1406 Value *NewLshr = Builder.CreateLShr(Y, Op1); in visitLShr()
1580 if (match(Op0, m_OneUse(m_Shl(m_Value(X), m_Specific(Op1))))) { in visitLShr()
1582 Value *Mask = Builder.CreateLShr(AllOnes, Op1); in visitLShr()
1587 if (match(Op0, m_Shl(m_AllOnes(), m_Specific(Op1)))) { in visitLShr()
1589 return BinaryOperator::CreateLShr(AllOnes, Op1); in visitLShr()
1678 Value *Op0 = I.getOperand(0), *Op1 = I.getOperand(1); in visitAShr() local
1682 if (match(Op1, m_APInt(ShAmtAPInt)) && ShAmtAPInt->ult(BitWidth)) { in visitAShr()
1689 if (match(Op0, m_Shl(m_ZExt(m_Value(X)), m_Specific(Op1))) && in visitAShr()
1768 if (match(Op1, m_SpecificIntAllowPoison(BitWidth - 1)) && in visitAShr()
1774 Constant::mergeUndefsWith(Mask, cast<Constant>(Op1)), in visitAShr()
1785 Instruction *Lshr = BinaryOperator::CreateLShr(Op0, Op1); in visitAShr()
1794 auto *NewAShr = Builder.CreateAShr(X, Op1, Op0->getName() + ".not"); in visitAShr()