Lines Matching refs:AP2
1138 const APInt &AP2) { in foldICmpShrConstConst() argument
1148 if (AP2.isZero()) in foldICmpShrConstConst()
1153 if (AP2.isAllOnes()) in foldICmpShrConstConst()
1155 if (AP2.isNegative() != AP1.isNegative()) in foldICmpShrConstConst()
1157 if (AP2.sgt(AP1)) in foldICmpShrConstConst()
1164 ConstantInt::get(A->getType(), AP2.logBase2())); in foldICmpShrConstConst()
1166 if (AP1 == AP2) in foldICmpShrConstConst()
1171 Shift = AP1.countLeadingOnes() - AP2.countLeadingOnes(); in foldICmpShrConstConst()
1173 Shift = AP1.countLeadingZeros() - AP2.countLeadingZeros(); in foldICmpShrConstConst()
1176 if (IsAShr && AP1 == AP2.ashr(Shift)) { in foldICmpShrConstConst()
1179 if (AP1.isAllOnes() && !AP2.isPowerOf2()) in foldICmpShrConstConst()
1182 } else if (AP1 == AP2.lshr(Shift)) { in foldICmpShrConstConst()
1197 const APInt &AP2) { in foldICmpShlConstConst() argument
1207 if (AP2.isZero()) in foldICmpShlConstConst()
1210 unsigned AP2TrailingZeros = AP2.countTrailingZeros(); in foldICmpShlConstConst()
1215 ConstantInt::get(A->getType(), AP2.getBitWidth() - AP2TrailingZeros)); in foldICmpShlConstConst()
1217 if (AP1 == AP2) in foldICmpShlConstConst()
1223 if (Shift > 0 && AP2.shl(Shift) == AP1) in foldICmpShlConstConst()
4272 const APInt *AP1, *AP2; in foldICmpBinOp() local
4275 if (match(B, m_APIntAllowUndef(AP1)) && match(D, m_APIntAllowUndef(AP2)) && in foldICmpBinOp()
4276 AP1->isNegative() == AP2->isNegative()) { in foldICmpBinOp()
4278 APInt AP2Abs = AP2->abs(); in foldICmpBinOp()
4280 APInt Diff = *AP1 - *AP2; in foldICmpBinOp()
4287 APInt Diff = *AP2 - *AP1; in foldICmpBinOp()
4288 bool HasNUW = BO1->hasNoUnsignedWrap() && Diff.ule(*AP2); in foldICmpBinOp()
4690 const APInt *AP1, *AP2; in foldICmpEquality() local
4692 match(Op1, m_OneUse(m_LShr(m_Value(B), m_APIntAllowUndef(AP2))))) || in foldICmpEquality()
4694 match(Op1, m_OneUse(m_AShr(m_Value(B), m_APIntAllowUndef(AP2)))))) { in foldICmpEquality()
4695 if (AP1 != AP2) in foldICmpEquality()