Lines Matching refs:AP2

963                                                      const APInt &AP2) {  in foldICmpShrConstConst()  argument
973 if (AP2.isZero()) in foldICmpShrConstConst()
978 if (AP2.isAllOnes()) in foldICmpShrConstConst()
980 if (AP2.isNegative() != AP1.isNegative()) in foldICmpShrConstConst()
982 if (AP2.sgt(AP1)) in foldICmpShrConstConst()
989 ConstantInt::get(A->getType(), AP2.logBase2())); in foldICmpShrConstConst()
991 if (AP1 == AP2) in foldICmpShrConstConst()
996 Shift = AP1.countl_one() - AP2.countl_one(); in foldICmpShrConstConst()
998 Shift = AP1.countl_zero() - AP2.countl_zero(); in foldICmpShrConstConst()
1001 if (IsAShr && AP1 == AP2.ashr(Shift)) { in foldICmpShrConstConst()
1004 if (AP1.isAllOnes() && !AP2.isPowerOf2()) in foldICmpShrConstConst()
1007 } else if (AP1 == AP2.lshr(Shift)) { in foldICmpShrConstConst()
1022 const APInt &AP2) { in foldICmpShlConstConst() argument
1032 if (AP2.isZero()) in foldICmpShlConstConst()
1035 unsigned AP2TrailingZeros = AP2.countr_zero(); in foldICmpShlConstConst()
1040 ConstantInt::get(A->getType(), AP2.getBitWidth() - AP2TrailingZeros)); in foldICmpShlConstConst()
1042 if (AP1 == AP2) in foldICmpShlConstConst()
1048 if (Shift > 0 && AP2.shl(Shift) == AP1) in foldICmpShlConstConst()
4774 const APInt *AP1, *AP2; in foldICmpBinOp() local
4777 if (match(B, m_APIntAllowUndef(AP1)) && match(D, m_APIntAllowUndef(AP2)) && in foldICmpBinOp()
4778 AP1->isNegative() == AP2->isNegative()) { in foldICmpBinOp()
4780 APInt AP2Abs = AP2->abs(); in foldICmpBinOp()
4782 APInt Diff = *AP1 - *AP2; in foldICmpBinOp()
4788 APInt Diff = *AP2 - *AP1; in foldICmpBinOp()
4791 C, C3, "", Op1HasNUW && Diff.ule(*AP2), Op1HasNSW); in foldICmpBinOp()
5351 const APInt *AP1, *AP2; in foldICmpEquality() local
5353 match(Op1, m_OneUse(m_LShr(m_Value(B), m_APIntAllowUndef(AP2))))) || in foldICmpEquality()
5355 match(Op1, m_OneUse(m_AShr(m_Value(B), m_APIntAllowUndef(AP2)))))) { in foldICmpEquality()
5356 if (AP1 != AP2) in foldICmpEquality()