Lines Matching refs:ICmpInst
1450 static Value *simplifyUnsignedRangeCheck(ICmpInst *ZeroICmp, in simplifyUnsignedRangeCheck()
1451 ICmpInst *UnsignedICmp, bool IsAnd) { in simplifyUnsignedRangeCheck()
1454 ICmpInst::Predicate EqPred; in simplifyUnsignedRangeCheck()
1456 !ICmpInst::isEquality(EqPred)) in simplifyUnsignedRangeCheck()
1459 ICmpInst::Predicate UnsignedPred; in simplifyUnsignedRangeCheck()
1461 ICmpInst::isUnsigned(UnsignedPred)) in simplifyUnsignedRangeCheck()
1465 ICmpInst::isUnsigned(UnsignedPred)) in simplifyUnsignedRangeCheck()
1466 UnsignedPred = ICmpInst::getSwappedPredicate(UnsignedPred); in simplifyUnsignedRangeCheck()
1472 if (UnsignedPred == ICmpInst::ICMP_ULT && EqPred == ICmpInst::ICMP_NE) in simplifyUnsignedRangeCheck()
1477 if (UnsignedPred == ICmpInst::ICMP_UGE && !IsAnd) { in simplifyUnsignedRangeCheck()
1478 if (EqPred == ICmpInst::ICMP_NE) in simplifyUnsignedRangeCheck()
1484 if (UnsignedPred == ICmpInst::ICMP_ULT && EqPred == ICmpInst::ICMP_EQ && in simplifyUnsignedRangeCheck()
1493 static Value *SimplifyAndOfICmps(ICmpInst *Op0, ICmpInst *Op1) { in SimplifyAndOfICmps()
1494 ICmpInst::Predicate Pred0, Pred1; in SimplifyAndOfICmps()
1519 if (Pred0 == ICmpInst::ICMP_ULT && Pred1 == ICmpInst::ICMP_SGT) in SimplifyAndOfICmps()
1521 if (Pred0 == ICmpInst::ICMP_SLT && Pred1 == ICmpInst::ICMP_SGT && isNSW) in SimplifyAndOfICmps()
1525 if (Pred0 == ICmpInst::ICMP_ULE && Pred1 == ICmpInst::ICMP_SGT) in SimplifyAndOfICmps()
1527 if (Pred0 == ICmpInst::ICMP_SLE && Pred1 == ICmpInst::ICMP_SGT && isNSW) in SimplifyAndOfICmps()
1533 if (Pred0 == ICmpInst::ICMP_ULT && Pred1 == ICmpInst::ICMP_UGT) in SimplifyAndOfICmps()
1536 if (Pred0 == ICmpInst::ICMP_ULE && Pred1 == ICmpInst::ICMP_UGT) in SimplifyAndOfICmps()
1601 if (auto *ICILHS = dyn_cast<ICmpInst>(Op0)) { in SimplifyAndInst()
1602 if (auto *ICIRHS = dyn_cast<ICmpInst>(Op1)) { in SimplifyAndInst()
1652 static Value *SimplifyOrOfICmps(ICmpInst *Op0, ICmpInst *Op1) { in SimplifyOrOfICmps()
1653 ICmpInst::Predicate Pred0, Pred1; in SimplifyOrOfICmps()
1678 if (Pred0 == ICmpInst::ICMP_UGE && Pred1 == ICmpInst::ICMP_SLE) in SimplifyOrOfICmps()
1680 if (Pred0 == ICmpInst::ICMP_SGE && Pred1 == ICmpInst::ICMP_SLE && isNSW) in SimplifyOrOfICmps()
1684 if (Pred0 == ICmpInst::ICMP_UGT && Pred1 == ICmpInst::ICMP_SLE) in SimplifyOrOfICmps()
1686 if (Pred0 == ICmpInst::ICMP_SGT && Pred1 == ICmpInst::ICMP_SLE && isNSW) in SimplifyOrOfICmps()
1692 if (Pred0 == ICmpInst::ICMP_UGE && Pred1 == ICmpInst::ICMP_ULE) in SimplifyOrOfICmps()
1695 if (Pred0 == ICmpInst::ICMP_UGT && Pred1 == ICmpInst::ICMP_ULE) in SimplifyOrOfICmps()
1759 if (auto *ICILHS = dyn_cast<ICmpInst>(Op0)) { in SimplifyOrInst()
1760 if (auto *ICIRHS = dyn_cast<ICmpInst>(Op1)) { in SimplifyOrInst()
1979 Pred = ICmpInst::getSignedPredicate(Pred); in computePointerICmp()
2146 case ICmpInst::ICMP_EQ: in SimplifyICmpInst()
2151 case ICmpInst::ICMP_NE: in SimplifyICmpInst()
2156 case ICmpInst::ICMP_UGT: in SimplifyICmpInst()
2161 case ICmpInst::ICMP_UGE: in SimplifyICmpInst()
2166 case ICmpInst::ICMP_SLT: in SimplifyICmpInst()
2171 case ICmpInst::ICMP_SLE: in SimplifyICmpInst()
2184 case ICmpInst::ICMP_ULT: in SimplifyICmpInst()
2186 case ICmpInst::ICMP_UGE: in SimplifyICmpInst()
2188 case ICmpInst::ICMP_EQ: in SimplifyICmpInst()
2189 case ICmpInst::ICMP_ULE: in SimplifyICmpInst()
2193 case ICmpInst::ICMP_NE: in SimplifyICmpInst()
2194 case ICmpInst::ICMP_UGT: in SimplifyICmpInst()
2198 case ICmpInst::ICMP_SLT: in SimplifyICmpInst()
2206 case ICmpInst::ICMP_SLE: in SimplifyICmpInst()
2215 case ICmpInst::ICMP_SGE: in SimplifyICmpInst()
2223 case ICmpInst::ICMP_SGT: in SimplifyICmpInst()
2238 ConstantRange RHS_CR = ICmpInst::makeConstantRange(Pred, CI->getValue()); in SimplifyICmpInst()
2391 if (Value *V = SimplifyICmpInst(ICmpInst::getUnsignedPredicate(Pred), in SimplifyICmpInst()
2407 if (Value *V = SimplifyICmpInst(ICmpInst::getUnsignedPredicate(Pred), in SimplifyICmpInst()
2417 case ICmpInst::ICMP_EQ: in SimplifyICmpInst()
2418 case ICmpInst::ICMP_UGT: in SimplifyICmpInst()
2419 case ICmpInst::ICMP_UGE: in SimplifyICmpInst()
2422 case ICmpInst::ICMP_NE: in SimplifyICmpInst()
2423 case ICmpInst::ICMP_ULT: in SimplifyICmpInst()
2424 case ICmpInst::ICMP_ULE: in SimplifyICmpInst()
2429 case ICmpInst::ICMP_SGT: in SimplifyICmpInst()
2430 case ICmpInst::ICMP_SGE: in SimplifyICmpInst()
2435 case ICmpInst::ICMP_SLT: in SimplifyICmpInst()
2436 case ICmpInst::ICMP_SLE: in SimplifyICmpInst()
2474 case ICmpInst::ICMP_EQ: in SimplifyICmpInst()
2476 case ICmpInst::ICMP_NE: in SimplifyICmpInst()
2481 case ICmpInst::ICMP_SGT: in SimplifyICmpInst()
2482 case ICmpInst::ICMP_SGE: in SimplifyICmpInst()
2486 case ICmpInst::ICMP_SLT: in SimplifyICmpInst()
2487 case ICmpInst::ICMP_SLE: in SimplifyICmpInst()
2494 case ICmpInst::ICMP_UGT: in SimplifyICmpInst()
2495 case ICmpInst::ICMP_UGE: in SimplifyICmpInst()
2498 if (Value *V = SimplifyICmpInst(ICmpInst::ICMP_SLT, SrcOp, in SimplifyICmpInst()
2503 case ICmpInst::ICMP_ULT: in SimplifyICmpInst()
2504 case ICmpInst::ICMP_ULE: in SimplifyICmpInst()
2507 if (Value *V = SimplifyICmpInst(ICmpInst::ICMP_SGE, SrcOp, in SimplifyICmpInst()
2528 NoLHSWrapProblem = ICmpInst::isEquality(Pred) || in SimplifyICmpInst()
2534 NoRHSWrapProblem = ICmpInst::isEquality(Pred) || in SimplifyICmpInst()
2584 if (Pred == ICmpInst::ICMP_ULT) in SimplifyICmpInst()
2586 if (Pred == ICmpInst::ICMP_UGE) in SimplifyICmpInst()
2592 if (Pred == ICmpInst::ICMP_ULE) in SimplifyICmpInst()
2594 if (Pred == ICmpInst::ICMP_UGT) in SimplifyICmpInst()
2601 if (Pred == ICmpInst::ICMP_UGT) in SimplifyICmpInst()
2603 if (Pred == ICmpInst::ICMP_ULE) in SimplifyICmpInst()
2609 if (Pred == ICmpInst::ICMP_UGE) in SimplifyICmpInst()
2611 if (Pred == ICmpInst::ICMP_ULT) in SimplifyICmpInst()
2619 if (Pred == ICmpInst::ICMP_SLT) in SimplifyICmpInst()
2621 if (Pred == ICmpInst::ICMP_SGE) in SimplifyICmpInst()
2623 if (Pred == ICmpInst::ICMP_EQ) in SimplifyICmpInst()
2625 if (Pred == ICmpInst::ICMP_NE) in SimplifyICmpInst()
2629 if (Pred == ICmpInst::ICMP_SLE) in SimplifyICmpInst()
2631 if (Pred == ICmpInst::ICMP_SGT) in SimplifyICmpInst()
2643 case ICmpInst::ICMP_SGT: in SimplifyICmpInst()
2644 case ICmpInst::ICMP_SGE: in SimplifyICmpInst()
2650 case ICmpInst::ICMP_EQ: in SimplifyICmpInst()
2651 case ICmpInst::ICMP_UGT: in SimplifyICmpInst()
2652 case ICmpInst::ICMP_UGE: in SimplifyICmpInst()
2654 case ICmpInst::ICMP_SLT: in SimplifyICmpInst()
2655 case ICmpInst::ICMP_SLE: in SimplifyICmpInst()
2661 case ICmpInst::ICMP_NE: in SimplifyICmpInst()
2662 case ICmpInst::ICMP_ULT: in SimplifyICmpInst()
2663 case ICmpInst::ICMP_ULE: in SimplifyICmpInst()
2674 case ICmpInst::ICMP_SGT: in SimplifyICmpInst()
2675 case ICmpInst::ICMP_SGE: in SimplifyICmpInst()
2681 case ICmpInst::ICMP_NE: in SimplifyICmpInst()
2682 case ICmpInst::ICMP_UGT: in SimplifyICmpInst()
2683 case ICmpInst::ICMP_UGE: in SimplifyICmpInst()
2685 case ICmpInst::ICMP_SLT: in SimplifyICmpInst()
2686 case ICmpInst::ICMP_SLE: in SimplifyICmpInst()
2692 case ICmpInst::ICMP_EQ: in SimplifyICmpInst()
2693 case ICmpInst::ICMP_ULT: in SimplifyICmpInst()
2694 case ICmpInst::ICMP_ULE: in SimplifyICmpInst()
2702 if (Pred == ICmpInst::ICMP_UGT) in SimplifyICmpInst()
2704 if (Pred == ICmpInst::ICMP_ULE) in SimplifyICmpInst()
2728 if (Pred == ICmpInst::ICMP_EQ) in SimplifyICmpInst()
2730 if (Pred == ICmpInst::ICMP_NE) in SimplifyICmpInst()
2735 if (Pred == ICmpInst::ICMP_UGT) in SimplifyICmpInst()
2737 if (Pred == ICmpInst::ICMP_ULE) in SimplifyICmpInst()
2749 if (ICmpInst::isSigned(Pred)) in SimplifyICmpInst()
2765 if (!NSW && ICmpInst::isSigned(Pred)) in SimplifyICmpInst()
2973 (ICmpInst::isEquality(Pred) || in SimplifyICmpInst()
2975 Pred == ICmpInst::getSignedPredicate(Pred)))) { in SimplifyICmpInst()
2994 if (ICmpInst::isEquality(Pred)) { in SimplifyICmpInst()
3003 return Pred == ICmpInst::ICMP_EQ in SimplifyICmpInst()
3177 const auto *ICI = dyn_cast<ICmpInst>(CondVal); in SimplifySelectInst()
3180 ICmpInst::Predicate Pred = ICI->getPredicate(); in SimplifySelectInst()
3186 if (ICmpInst::isEquality(Pred) && in SimplifySelectInst()
3190 TrueWhenUnset = Pred == ICmpInst::ICMP_EQ; in SimplifySelectInst()
3191 } else if (Pred == ICmpInst::ICMP_SLT && in SimplifySelectInst()
3197 } else if (Pred == ICmpInst::ICMP_SGT && in SimplifySelectInst()
3722 SimplifyICmpInst(cast<ICmpInst>(I)->getPredicate(), I->getOperand(0), in SimplifyInstruction()