Lines Matching defs:AP1
959 /// Handle "(icmp eq/ne (ashr/lshr AP2, A), AP1)" ->
960 /// (icmp eq/ne A, Log2(AP2/AP1)) ->
961 /// (icmp eq/ne A, Log2(AP2) - Log2(AP1)).
963 const APInt &AP1,
981 if (AP2.isNegative() != AP1.isNegative())
983 if (AP2.sgt(AP1))
987 if (!AP1)
992 if (AP1 == AP2)
996 if (IsAShr && AP1.isNegative())
997 Shift = AP1.countl_one() - AP2.countl_one();
999 Shift = AP1.countl_zero() - AP2.countl_zero();
1002 if (IsAShr && AP1 == AP2.ashr(Shift)) {
1005 if (AP1.isAllOnes() && !AP2.isPowerOf2())
1008 } else if (AP1 == AP2.lshr(Shift)) {
1019 /// Handle "(icmp eq/ne (shl AP2, A), AP1)" ->
1020 /// (icmp eq/ne A, TrailingZeros(AP1) - TrailingZeros(AP2)).
1022 const APInt &AP1,
1038 if (!AP1 && AP2TrailingZeros != 0)
1043 if (AP1 == AP2)
1047 int Shift = AP1.countr_zero() - AP2TrailingZeros;
1049 if (Shift > 0 && AP2.shl(Shift) == AP1)
5105 const APInt *AP1, *AP2;
5108 if (match(B, m_APIntAllowPoison(AP1)) &&
5110 AP1->isNegative() == AP2->isNegative()) {
5111 APInt AP1Abs = AP1->abs();
5114 APInt Diff = *AP1 - *AP2;
5117 A, C3, "", Op0HasNUW && Diff.ule(*AP1), Op0HasNSW);
5120 APInt Diff = *AP2 - *AP1;
5680 const APInt *AP1, *AP2;
5681 if ((match(Op0, m_OneUse(m_LShr(m_Value(A), m_APIntAllowPoison(AP1)))) &&
5683 (match(Op0, m_OneUse(m_AShr(m_Value(A), m_APIntAllowPoison(AP1)))) &&
5685 if (AP1 != AP2)
5687 unsigned TypeBits = AP1->getBitWidth();
5688 unsigned ShAmt = AP1->getLimitedValue(TypeBits);