Lines Matching refs:CI2
1509 ConstantInt *CI1, *CI2; in SimplifyAndOfICmps() local
1516 m_ConstantInt(CI2)))) in SimplifyAndOfICmps()
1529 const APInt &CI2V = CI2->getValue(); in SimplifyAndOfICmps()
1668 ConstantInt *CI1, *CI2; in SimplifyOrOfICmps() local
1675 m_ConstantInt(CI2)))) in SimplifyOrOfICmps()
1688 const APInt &CI2V = CI2->getValue(); in SimplifyOrOfICmps()
2279 ConstantInt *CI2; in SimplifyICmpInst() local
2280 if (match(LHS, m_URem(m_Value(), m_ConstantInt(CI2)))) { in SimplifyICmpInst()
2282 Upper = CI2->getValue(); in SimplifyICmpInst()
2283 } else if (match(LHS, m_SRem(m_Value(), m_ConstantInt(CI2)))) { in SimplifyICmpInst()
2285 Upper = CI2->getValue().abs(); in SimplifyICmpInst()
2287 } else if (match(LHS, m_UDiv(m_ConstantInt(CI2), m_Value()))) { in SimplifyICmpInst()
2289 Upper = CI2->getValue() + 1; in SimplifyICmpInst()
2290 } else if (match(LHS, m_UDiv(m_Value(), m_ConstantInt(CI2)))) { in SimplifyICmpInst()
2293 if (!CI2->isZero()) in SimplifyICmpInst()
2294 Upper = NegOne.udiv(CI2->getValue()) + 1; in SimplifyICmpInst()
2295 } else if (match(LHS, m_SDiv(m_ConstantInt(CI2), m_Value()))) { in SimplifyICmpInst()
2296 if (CI2->isMinSignedValue()) { in SimplifyICmpInst()
2298 Lower = CI2->getValue(); in SimplifyICmpInst()
2302 Upper = CI2->getValue().abs() + 1; in SimplifyICmpInst()
2305 } else if (match(LHS, m_SDiv(m_Value(), m_ConstantInt(CI2)))) { in SimplifyICmpInst()
2308 APInt Val = CI2->getValue(); in SimplifyICmpInst()
2324 } else if (match(LHS, m_NUWShl(m_ConstantInt(CI2), m_Value()))) { in SimplifyICmpInst()
2326 Lower = CI2->getValue(); in SimplifyICmpInst()
2328 } else if (match(LHS, m_NSWShl(m_ConstantInt(CI2), m_Value()))) { in SimplifyICmpInst()
2329 if (CI2->isNegative()) { in SimplifyICmpInst()
2331 unsigned ShiftAmount = CI2->getValue().countLeadingOnes() - 1; in SimplifyICmpInst()
2332 Lower = CI2->getValue().shl(ShiftAmount); in SimplifyICmpInst()
2333 Upper = CI2->getValue() + 1; in SimplifyICmpInst()
2336 unsigned ShiftAmount = CI2->getValue().countLeadingZeros() - 1; in SimplifyICmpInst()
2337 Lower = CI2->getValue(); in SimplifyICmpInst()
2338 Upper = CI2->getValue().shl(ShiftAmount) + 1; in SimplifyICmpInst()
2340 } else if (match(LHS, m_LShr(m_Value(), m_ConstantInt(CI2)))) { in SimplifyICmpInst()
2343 if (CI2->getValue().ult(Width)) in SimplifyICmpInst()
2344 Upper = NegOne.lshr(CI2->getValue()) + 1; in SimplifyICmpInst()
2345 } else if (match(LHS, m_LShr(m_ConstantInt(CI2), m_Value()))) { in SimplifyICmpInst()
2348 if (!CI2->isZero() && cast<BinaryOperator>(LHS)->isExact()) in SimplifyICmpInst()
2349 ShiftAmount = CI2->getValue().countTrailingZeros(); in SimplifyICmpInst()
2350 Lower = CI2->getValue().lshr(ShiftAmount); in SimplifyICmpInst()
2351 Upper = CI2->getValue() + 1; in SimplifyICmpInst()
2352 } else if (match(LHS, m_AShr(m_Value(), m_ConstantInt(CI2)))) { in SimplifyICmpInst()
2356 if (CI2->getValue().ult(Width)) { in SimplifyICmpInst()
2357 Lower = IntMin.ashr(CI2->getValue()); in SimplifyICmpInst()
2358 Upper = IntMax.ashr(CI2->getValue()) + 1; in SimplifyICmpInst()
2360 } else if (match(LHS, m_AShr(m_ConstantInt(CI2), m_Value()))) { in SimplifyICmpInst()
2362 if (!CI2->isZero() && cast<BinaryOperator>(LHS)->isExact()) in SimplifyICmpInst()
2363 ShiftAmount = CI2->getValue().countTrailingZeros(); in SimplifyICmpInst()
2364 if (CI2->isNegative()) { in SimplifyICmpInst()
2366 Lower = CI2->getValue(); in SimplifyICmpInst()
2367 Upper = CI2->getValue().ashr(ShiftAmount) + 1; in SimplifyICmpInst()
2370 Lower = CI2->getValue().ashr(ShiftAmount); in SimplifyICmpInst()
2371 Upper = CI2->getValue() + 1; in SimplifyICmpInst()
2373 } else if (match(LHS, m_Or(m_Value(), m_ConstantInt(CI2)))) { in SimplifyICmpInst()
2375 Lower = CI2->getValue(); in SimplifyICmpInst()
2376 } else if (match(LHS, m_And(m_Value(), m_ConstantInt(CI2)))) { in SimplifyICmpInst()
2378 Upper = CI2->getValue() + 1; in SimplifyICmpInst()
2379 } else if (match(LHS, m_NUWAdd(m_Value(), m_ConstantInt(CI2)))) { in SimplifyICmpInst()
2381 Lower = CI2->getValue(); in SimplifyICmpInst()