• Home
  • Raw
  • Download

Lines Matching refs:ICmpInst

1459 static Value *simplifyUnsignedRangeCheck(ICmpInst *ZeroICmp,  in simplifyUnsignedRangeCheck()
1460 ICmpInst *UnsignedICmp, bool IsAnd) { in simplifyUnsignedRangeCheck()
1463 ICmpInst::Predicate EqPred; in simplifyUnsignedRangeCheck()
1465 !ICmpInst::isEquality(EqPred)) in simplifyUnsignedRangeCheck()
1468 ICmpInst::Predicate UnsignedPred; in simplifyUnsignedRangeCheck()
1470 ICmpInst::isUnsigned(UnsignedPred)) in simplifyUnsignedRangeCheck()
1474 ICmpInst::isUnsigned(UnsignedPred)) in simplifyUnsignedRangeCheck()
1475 UnsignedPred = ICmpInst::getSwappedPredicate(UnsignedPred); in simplifyUnsignedRangeCheck()
1481 if (UnsignedPred == ICmpInst::ICMP_ULT && EqPred == ICmpInst::ICMP_NE) in simplifyUnsignedRangeCheck()
1486 if (UnsignedPred == ICmpInst::ICMP_UGE && !IsAnd) { in simplifyUnsignedRangeCheck()
1487 if (EqPred == ICmpInst::ICMP_NE) in simplifyUnsignedRangeCheck()
1493 if (UnsignedPred == ICmpInst::ICMP_ULT && EqPred == ICmpInst::ICMP_EQ && in simplifyUnsignedRangeCheck()
1500 static Value *SimplifyAndOfICmps(ICmpInst *Op0, ICmpInst *Op1) { in SimplifyAndOfICmps()
1502 ICmpInst::Predicate Pred0, Pred1; in SimplifyAndOfICmps()
1537 if (Pred0 == ICmpInst::ICMP_ULT && Pred1 == ICmpInst::ICMP_SGT) in SimplifyAndOfICmps()
1539 if (Pred0 == ICmpInst::ICMP_SLT && Pred1 == ICmpInst::ICMP_SGT && isNSW) in SimplifyAndOfICmps()
1543 if (Pred0 == ICmpInst::ICMP_ULE && Pred1 == ICmpInst::ICMP_SGT) in SimplifyAndOfICmps()
1545 if (Pred0 == ICmpInst::ICMP_SLE && Pred1 == ICmpInst::ICMP_SGT && isNSW) in SimplifyAndOfICmps()
1551 if (Pred0 == ICmpInst::ICMP_ULT && Pred1 == ICmpInst::ICMP_UGT) in SimplifyAndOfICmps()
1554 if (Pred0 == ICmpInst::ICMP_ULE && Pred1 == ICmpInst::ICMP_UGT) in SimplifyAndOfICmps()
1616 if (auto *ICILHS = dyn_cast<ICmpInst>(Op0)) { in SimplifyAndInst()
1617 if (auto *ICIRHS = dyn_cast<ICmpInst>(Op1)) { in SimplifyAndInst()
1631 auto *Cmp0 = dyn_cast<ICmpInst>(Cast0->getOperand(0)); in SimplifyAndInst()
1632 auto *Cmp1 = dyn_cast<ICmpInst>(Cast1->getOperand(0)); in SimplifyAndInst()
1685 static Value *SimplifyOrOfICmps(ICmpInst *Op0, ICmpInst *Op1) { in SimplifyOrOfICmps()
1686 ICmpInst::Predicate Pred0, Pred1; in SimplifyOrOfICmps()
1711 if (Pred0 == ICmpInst::ICMP_UGE && Pred1 == ICmpInst::ICMP_SLE) in SimplifyOrOfICmps()
1713 if (Pred0 == ICmpInst::ICMP_SGE && Pred1 == ICmpInst::ICMP_SLE && isNSW) in SimplifyOrOfICmps()
1717 if (Pred0 == ICmpInst::ICMP_UGT && Pred1 == ICmpInst::ICMP_SLE) in SimplifyOrOfICmps()
1719 if (Pred0 == ICmpInst::ICMP_SGT && Pred1 == ICmpInst::ICMP_SLE && isNSW) in SimplifyOrOfICmps()
1725 if (Pred0 == ICmpInst::ICMP_UGE && Pred1 == ICmpInst::ICMP_ULE) in SimplifyOrOfICmps()
1728 if (Pred0 == ICmpInst::ICMP_UGT && Pred1 == ICmpInst::ICMP_ULE) in SimplifyOrOfICmps()
1789 if (auto *ICILHS = dyn_cast<ICmpInst>(Op0)) { in SimplifyOrInst()
1790 if (auto *ICIRHS = dyn_cast<ICmpInst>(Op1)) { in SimplifyOrInst()
2006 Pred = ICmpInst::getSignedPredicate(Pred); in computePointerICmp()
2182 case ICmpInst::ICMP_EQ: in SimplifyICmpInst()
2187 case ICmpInst::ICMP_NE: in SimplifyICmpInst()
2192 case ICmpInst::ICMP_UGT: in SimplifyICmpInst()
2197 case ICmpInst::ICMP_UGE: { in SimplifyICmpInst()
2205 case ICmpInst::ICMP_SGE: { in SimplifyICmpInst()
2217 case ICmpInst::ICMP_SLT: in SimplifyICmpInst()
2222 case ICmpInst::ICMP_SLE: in SimplifyICmpInst()
2227 case ICmpInst::ICMP_ULE: { in SimplifyICmpInst()
2240 case ICmpInst::ICMP_ULT: in SimplifyICmpInst()
2242 case ICmpInst::ICMP_UGE: in SimplifyICmpInst()
2244 case ICmpInst::ICMP_EQ: in SimplifyICmpInst()
2245 case ICmpInst::ICMP_ULE: in SimplifyICmpInst()
2249 case ICmpInst::ICMP_NE: in SimplifyICmpInst()
2250 case ICmpInst::ICMP_UGT: in SimplifyICmpInst()
2254 case ICmpInst::ICMP_SLT: in SimplifyICmpInst()
2262 case ICmpInst::ICMP_SLE: in SimplifyICmpInst()
2271 case ICmpInst::ICMP_SGE: in SimplifyICmpInst()
2279 case ICmpInst::ICMP_SGT: in SimplifyICmpInst()
2294 ConstantRange RHS_CR = ICmpInst::makeConstantRange(Pred, CI->getValue()); in SimplifyICmpInst()
2481 if (Value *V = SimplifyICmpInst(ICmpInst::getUnsignedPredicate(Pred), in SimplifyICmpInst()
2497 if (Value *V = SimplifyICmpInst(ICmpInst::getUnsignedPredicate(Pred), in SimplifyICmpInst()
2507 case ICmpInst::ICMP_EQ: in SimplifyICmpInst()
2508 case ICmpInst::ICMP_UGT: in SimplifyICmpInst()
2509 case ICmpInst::ICMP_UGE: in SimplifyICmpInst()
2512 case ICmpInst::ICMP_NE: in SimplifyICmpInst()
2513 case ICmpInst::ICMP_ULT: in SimplifyICmpInst()
2514 case ICmpInst::ICMP_ULE: in SimplifyICmpInst()
2519 case ICmpInst::ICMP_SGT: in SimplifyICmpInst()
2520 case ICmpInst::ICMP_SGE: in SimplifyICmpInst()
2525 case ICmpInst::ICMP_SLT: in SimplifyICmpInst()
2526 case ICmpInst::ICMP_SLE: in SimplifyICmpInst()
2564 case ICmpInst::ICMP_EQ: in SimplifyICmpInst()
2566 case ICmpInst::ICMP_NE: in SimplifyICmpInst()
2571 case ICmpInst::ICMP_SGT: in SimplifyICmpInst()
2572 case ICmpInst::ICMP_SGE: in SimplifyICmpInst()
2576 case ICmpInst::ICMP_SLT: in SimplifyICmpInst()
2577 case ICmpInst::ICMP_SLE: in SimplifyICmpInst()
2584 case ICmpInst::ICMP_UGT: in SimplifyICmpInst()
2585 case ICmpInst::ICMP_UGE: in SimplifyICmpInst()
2588 if (Value *V = SimplifyICmpInst(ICmpInst::ICMP_SLT, SrcOp, in SimplifyICmpInst()
2593 case ICmpInst::ICMP_ULT: in SimplifyICmpInst()
2594 case ICmpInst::ICMP_ULE: in SimplifyICmpInst()
2597 if (Value *V = SimplifyICmpInst(ICmpInst::ICMP_SGE, SrcOp, in SimplifyICmpInst()
2609 if ((Pred == ICmpInst::ICMP_EQ || Pred == ICmpInst::ICMP_NE) && in SimplifyICmpInst()
2612 return Pred == ICmpInst::ICMP_NE ? in SimplifyICmpInst()
2626 NoLHSWrapProblem = ICmpInst::isEquality(Pred) || in SimplifyICmpInst()
2632 NoRHSWrapProblem = ICmpInst::isEquality(Pred) || in SimplifyICmpInst()
2683 if (Pred == ICmpInst::ICMP_ULT) in SimplifyICmpInst()
2685 if (Pred == ICmpInst::ICMP_UGE) in SimplifyICmpInst()
2688 if (Pred == ICmpInst::ICMP_SLT || Pred == ICmpInst::ICMP_SGE) { in SimplifyICmpInst()
2696 return Pred == ICmpInst::ICMP_SLT ? getTrue(ITy) : getFalse(ITy); in SimplifyICmpInst()
2698 return Pred == ICmpInst::ICMP_SLT ? getFalse(ITy) : getTrue(ITy); in SimplifyICmpInst()
2703 if (Pred == ICmpInst::ICMP_ULE) in SimplifyICmpInst()
2705 if (Pred == ICmpInst::ICMP_UGT) in SimplifyICmpInst()
2708 if (Pred == ICmpInst::ICMP_SGT || Pred == ICmpInst::ICMP_SLE) { in SimplifyICmpInst()
2716 return Pred == ICmpInst::ICMP_SGT ? getTrue(ITy) : getFalse(ITy); in SimplifyICmpInst()
2718 return Pred == ICmpInst::ICMP_SGT ? getFalse(ITy) : getTrue(ITy); in SimplifyICmpInst()
2726 if (Pred == ICmpInst::ICMP_UGT) in SimplifyICmpInst()
2728 if (Pred == ICmpInst::ICMP_ULE) in SimplifyICmpInst()
2734 if (Pred == ICmpInst::ICMP_UGE) in SimplifyICmpInst()
2736 if (Pred == ICmpInst::ICMP_ULT) in SimplifyICmpInst()
2744 if (Pred == ICmpInst::ICMP_SLT) in SimplifyICmpInst()
2746 if (Pred == ICmpInst::ICMP_SGE) in SimplifyICmpInst()
2748 if (Pred == ICmpInst::ICMP_EQ) in SimplifyICmpInst()
2750 if (Pred == ICmpInst::ICMP_NE) in SimplifyICmpInst()
2754 if (Pred == ICmpInst::ICMP_SLE) in SimplifyICmpInst()
2756 if (Pred == ICmpInst::ICMP_SGT) in SimplifyICmpInst()
2768 case ICmpInst::ICMP_SGT: in SimplifyICmpInst()
2769 case ICmpInst::ICMP_SGE: in SimplifyICmpInst()
2775 case ICmpInst::ICMP_EQ: in SimplifyICmpInst()
2776 case ICmpInst::ICMP_UGT: in SimplifyICmpInst()
2777 case ICmpInst::ICMP_UGE: in SimplifyICmpInst()
2779 case ICmpInst::ICMP_SLT: in SimplifyICmpInst()
2780 case ICmpInst::ICMP_SLE: in SimplifyICmpInst()
2786 case ICmpInst::ICMP_NE: in SimplifyICmpInst()
2787 case ICmpInst::ICMP_ULT: in SimplifyICmpInst()
2788 case ICmpInst::ICMP_ULE: in SimplifyICmpInst()
2799 case ICmpInst::ICMP_SGT: in SimplifyICmpInst()
2800 case ICmpInst::ICMP_SGE: in SimplifyICmpInst()
2806 case ICmpInst::ICMP_NE: in SimplifyICmpInst()
2807 case ICmpInst::ICMP_UGT: in SimplifyICmpInst()
2808 case ICmpInst::ICMP_UGE: in SimplifyICmpInst()
2810 case ICmpInst::ICMP_SLT: in SimplifyICmpInst()
2811 case ICmpInst::ICMP_SLE: in SimplifyICmpInst()
2817 case ICmpInst::ICMP_EQ: in SimplifyICmpInst()
2818 case ICmpInst::ICMP_ULT: in SimplifyICmpInst()
2819 case ICmpInst::ICMP_ULE: in SimplifyICmpInst()
2829 if (Pred == ICmpInst::ICMP_UGT) in SimplifyICmpInst()
2831 if (Pred == ICmpInst::ICMP_ULE) in SimplifyICmpInst()
2855 if (Pred == ICmpInst::ICMP_EQ) in SimplifyICmpInst()
2857 if (Pred == ICmpInst::ICMP_NE) in SimplifyICmpInst()
2862 if (Pred == ICmpInst::ICMP_UGT) in SimplifyICmpInst()
2864 if (Pred == ICmpInst::ICMP_ULE) in SimplifyICmpInst()
2876 if (ICmpInst::isSigned(Pred)) in SimplifyICmpInst()
2892 if (!NSW && ICmpInst::isSigned(Pred)) in SimplifyICmpInst()
3100 (ICmpInst::isEquality(Pred) || in SimplifyICmpInst()
3102 Pred == ICmpInst::getSignedPredicate(Pred)))) { in SimplifyICmpInst()
3121 if (ICmpInst::isEquality(Pred)) { in SimplifyICmpInst()
3130 return Pred == ICmpInst::ICMP_EQ in SimplifyICmpInst()
3402 if (const auto *ICI = dyn_cast<ICmpInst>(CondVal)) { in SimplifySelectInst()
3404 ICmpInst::Predicate Pred = ICI->getPredicate(); in SimplifySelectInst()
3412 if (ICmpInst::isEquality(Pred) && in SimplifySelectInst()
3416 TrueWhenUnset = Pred == ICmpInst::ICMP_EQ; in SimplifySelectInst()
3417 } else if (Pred == ICmpInst::ICMP_SLT && match(CmpRHS, m_Zero())) { in SimplifySelectInst()
3422 } else if (Pred == ICmpInst::ICMP_SGT && match(CmpRHS, m_AllOnes())) { in SimplifySelectInst()
3458 if (Pred == ICmpInst::ICMP_SLT && C->isMinSignedValue()) in SimplifySelectInst()
3461 if (Pred == ICmpInst::ICMP_ULT && C->isMinValue()) in SimplifySelectInst()
3464 if (Pred == ICmpInst::ICMP_SGT && C->isMaxSignedValue()) in SimplifySelectInst()
3467 if (Pred == ICmpInst::ICMP_UGT && C->isMaxValue()) in SimplifySelectInst()
3475 if (Pred == ICmpInst::ICMP_EQ) { in SimplifySelectInst()
3486 } else if (Pred == ICmpInst::ICMP_NE) { in SimplifySelectInst()
4177 SimplifyICmpInst(cast<ICmpInst>(I)->getPredicate(), I->getOperand(0), in SimplifyInstruction()