Lines Matching defs:AP1
981 /// Handle "(icmp eq/ne (ashr/lshr AP2, A), AP1)" ->
982 /// (icmp eq/ne A, Log2(AP2/AP1)) ->
983 /// (icmp eq/ne A, Log2(AP2) - Log2(AP1)).
985 const APInt &AP1,
1003 if (AP2.isNegative() != AP1.isNegative())
1005 if (AP2.sgt(AP1))
1009 if (!AP1)
1014 if (AP1 == AP2)
1018 if (IsAShr && AP1.isNegative())
1019 Shift = AP1.countl_one() - AP2.countl_one();
1021 Shift = AP1.countl_zero() - AP2.countl_zero();
1024 if (IsAShr && AP1 == AP2.ashr(Shift)) {
1027 if (AP1.isAllOnes() && !AP2.isPowerOf2())
1030 } else if (AP1 == AP2.lshr(Shift)) {
1041 /// Handle "(icmp eq/ne (shl AP2, A), AP1)" ->
1042 /// (icmp eq/ne A, TrailingZeros(AP1) - TrailingZeros(AP2)).
1044 const APInt &AP1,
1060 if (!AP1 && AP2TrailingZeros != 0)
1065 if (AP1 == AP2)
1069 int Shift = AP1.countr_zero() - AP2TrailingZeros;
1071 if (Shift > 0 && AP2.shl(Shift) == AP1)
5293 const APInt *AP1, *AP2;
5296 if (match(B, m_APIntAllowPoison(AP1)) &&
5298 AP1->isNegative() == AP2->isNegative()) {
5299 APInt AP1Abs = AP1->abs();
5302 APInt Diff = *AP1 - *AP2;
5305 A, C3, "", Op0HasNUW && Diff.ule(*AP1), Op0HasNSW);
5308 APInt Diff = *AP2 - *AP1;
5890 const APInt *AP1, *AP2;
5891 if ((match(Op0, m_OneUse(m_LShr(m_Value(A), m_APIntAllowPoison(AP1)))) &&
5893 (match(Op0, m_OneUse(m_AShr(m_Value(A), m_APIntAllowPoison(AP1)))) &&
5895 if (AP1 != AP2)
5897 unsigned TypeBits = AP1->getBitWidth();
5898 unsigned ShAmt = AP1->getLimitedValue(TypeBits);