/external/llvm/lib/Transforms/Utils/ |
D | CmpInstAnalysis.cpp | 44 unsigned llvm::getICmpCode(const ICmpInst *ICI, bool InvertPred) { in getICmpCode() 45 ICmpInst::Predicate Pred = InvertPred ? ICI->getInversePredicate() in getICmpCode() 49 case ICmpInst::ICMP_UGT: return 1; // 001 in getICmpCode() 50 case ICmpInst::ICMP_SGT: return 1; // 001 in getICmpCode() 51 case ICmpInst::ICMP_EQ: return 2; // 010 in getICmpCode() 52 case ICmpInst::ICMP_UGE: return 3; // 011 in getICmpCode() 53 case ICmpInst::ICMP_SGE: return 3; // 011 in getICmpCode() 54 case ICmpInst::ICMP_ULT: return 4; // 100 in getICmpCode() 55 case ICmpInst::ICMP_SLT: return 4; // 100 in getICmpCode() 56 case ICmpInst::ICMP_NE: return 5; // 101 in getICmpCode() [all …]
|
D | SimplifyIndVar.cpp | 75 void eliminateIVComparison(ICmpInst *ICmp, Value *IVOperand); 153 void SimplifyIndvar::eliminateIVComparison(ICmpInst *ICmp, Value *IVOperand) { in eliminateIVComparison() 155 ICmpInst::Predicate Pred = ICmp->getPredicate(); in eliminateIVComparison() 160 Pred = ICmpInst::getSwappedPredicate(Pred); in eliminateIVComparison() 172 ICmpInst::Predicate InvariantPredicate; in eliminateIVComparison() 181 } else if (SE->isKnownPredicate(ICmpInst::getInversePredicate(Pred), S, X)) { in eliminateIVComparison() 254 SE->isKnownPredicate(IsSigned ? ICmpInst::ICMP_SLT : ICmpInst::ICMP_ULT, in eliminateIVRemainder() 264 ICmpInst::ICMP_SLT : ICmpInst::ICMP_ULT, in eliminateIVRemainder() 268 ICmpInst *ICmp = new ICmpInst(Rem, ICmpInst::ICMP_EQ, in eliminateIVRemainder() 288 if (ICmpInst *ICmp = dyn_cast<ICmpInst>(UseInst)) { in eliminateIVUser()
|
D | LowerSwitch.cpp | 280 ICmpInst* Comp = new ICmpInst(ICmpInst::ICMP_SLT, in switchConvert() 310 ICmpInst* Comp = nullptr; in newLeafBlock() 313 Comp = new ICmpInst(*NewLeaf, ICmpInst::ICMP_EQ, Val, in newLeafBlock() 319 Comp = new ICmpInst(*NewLeaf, ICmpInst::ICMP_SLE, Val, Leaf.High, in newLeafBlock() 323 Comp = new ICmpInst(*NewLeaf, ICmpInst::ICMP_ULE, Val, Leaf.High, in newLeafBlock() 332 Comp = new ICmpInst(*NewLeaf, ICmpInst::ICMP_ULE, Add, UpperBound, in newLeafBlock()
|
/external/llvm/lib/Transforms/InstCombine/ |
D | InstCombineCompares.cpp | 120 static bool isSignBitCheck(ICmpInst::Predicate pred, ConstantInt *RHS, in isSignBitCheck() 123 case ICmpInst::ICMP_SLT: // True if LHS s< 0 in isSignBitCheck() 126 case ICmpInst::ICMP_SLE: // True if LHS s<= RHS and RHS == -1 in isSignBitCheck() 129 case ICmpInst::ICMP_SGT: // True if LHS s> -1 in isSignBitCheck() 132 case ICmpInst::ICMP_UGT: in isSignBitCheck() 136 case ICmpInst::ICMP_UGE: in isSignBitCheck() 148 static bool isSignTest(ICmpInst::Predicate &pred, const ConstantInt *RHS) { in isSignTest() 149 if (!ICmpInst::isSigned(pred)) in isSignTest() 153 return ICmpInst::isRelational(pred); in isSignTest() 156 if (pred == ICmpInst::ICMP_SLT) { in isSignTest() [all …]
|
D | InstCombineAndOrXor.cpp | 73 ICmpInst::Predicate NewPred; in getNewICmpValue() 303 ICmpInst::ICMP_SLE:ICmpInst::ICMP_ULE), Lo, Hi))->getZExtValue() && in InsertRangeTest() 312 ICmpInst::Predicate pred = (isSigned ? in InsertRangeTest() 313 ICmpInst::ICMP_SLT : ICmpInst::ICMP_ULT); in InsertRangeTest() 330 ICmpInst::Predicate pred = (isSigned ? in InsertRangeTest() 331 ICmpInst::ICMP_SGT : ICmpInst::ICMP_UGT); in InsertRangeTest() 453 ICmpInst::Predicate SCC) in getTypeOfMaskedICmp() 458 bool icmp_eq = (SCC == ICmpInst::ICMP_EQ); in getTypeOfMaskedICmp() 542 static bool decomposeBitTestICmp(const ICmpInst *I, ICmpInst::Predicate &Pred, in decomposeBitTestICmp() 551 case ICmpInst::ICMP_SLT: in decomposeBitTestICmp() [all …]
|
D | InstCombineInternal.h | 246 Value *simplifyRangeCheck(ICmpInst *Cmp0, ICmpInst *Cmp1, bool Inverted); 247 Value *FoldAndOfICmps(ICmpInst *LHS, ICmpInst *RHS); 250 Value *FoldOrOfICmps(ICmpInst *LHS, ICmpInst *RHS, Instruction *CxtI); 268 Instruction *visitICmpInst(ICmpInst &I); 269 Instruction *visitICmpInstWithCastAndCast(ICmpInst &ICI); 270 Instruction *visitICmpInstWithInstAndIntCst(ICmpInst &ICI, Instruction *LHS, 272 Instruction *FoldICmpDivCst(ICmpInst &ICI, BinaryOperator *DivI, 274 Instruction *FoldICmpShrCst(ICmpInst &ICI, BinaryOperator *DivI, 276 Instruction *FoldICmpCstShrCst(ICmpInst &I, Value *Op, Value *A, 278 Instruction *FoldICmpCstShlCst(ICmpInst &I, Value *Op, Value *A, [all …]
|
D | InstCombineSelect.cpp | 48 return ICmpInst::ICMP_SLT; in getCmpPredicateForMinMax() 50 return ICmpInst::ICMP_ULT; in getCmpPredicateForMinMax() 52 return ICmpInst::ICMP_SGT; in getCmpPredicateForMinMax() 54 return ICmpInst::ICMP_UGT; in getCmpPredicateForMinMax() 301 const ICmpInst *IC = dyn_cast<ICmpInst>(SI.getCondition()); in foldSelectICmpAndOr() 339 ICmpInst::Predicate Pred = IC->getPredicate(); in foldSelectICmpAndOr() 340 if ((Pred == ICmpInst::ICMP_NE && OrOnFalseVal) || in foldSelectICmpAndOr() 341 (Pred == ICmpInst::ICMP_EQ && OrOnTrueVal)) in foldSelectICmpAndOr() 359 static Value *foldSelectCttzCtlz(ICmpInst *ICI, Value *TrueVal, Value *FalseVal, in foldSelectCttzCtlz() 361 ICmpInst::Predicate Pred = ICI->getPredicate(); in foldSelectCttzCtlz() [all …]
|
D | InstCombineCasts.cpp | 519 return new ICmpInst(ICmpInst::ICMP_NE, Src, Zero); in visitTrunc() 583 Instruction *InstCombiner::transformZExtICmp(ICmpInst *ICI, Instruction &CI, in transformZExtICmp() 593 if ((ICI->getPredicate() == ICmpInst::ICMP_SLT && Op1CV == 0) || in transformZExtICmp() 594 (ICI->getPredicate() == ICmpInst::ICMP_SGT &&Op1CV.isAllOnesValue())) { in transformZExtICmp() 604 if (ICI->getPredicate() == ICmpInst::ICMP_SGT) { in transformZExtICmp() 632 bool isNE = ICI->getPredicate() == ICmpInst::ICMP_NE; in transformZExtICmp() 694 if (ICI->getPredicate() == ICmpInst::ICMP_EQ) in transformZExtICmp() 920 if (ICmpInst *ICI = dyn_cast<ICmpInst>(Src)) in visitZExt() 927 ICmpInst *LHS = dyn_cast<ICmpInst>(SrcI->getOperand(0)); in visitZExt() 928 ICmpInst *RHS = dyn_cast<ICmpInst>(SrcI->getOperand(1)); in visitZExt() [all …]
|
/external/llvm/lib/IR/ |
D | ConstantFold.cpp | 1382 static ICmpInst::Predicate areGlobalsPotentiallyEqual(const GlobalValue *GV1, in areGlobalsPotentiallyEqual() 1402 return ICmpInst::ICMP_NE; in areGlobalsPotentiallyEqual() 1403 return ICmpInst::BAD_ICMP_PREDICATE; in areGlobalsPotentiallyEqual() 1418 static ICmpInst::Predicate evaluateICmpRelation(Constant *V1, Constant *V2, in evaluateICmpRelation() 1422 if (V1 == V2) return ICmpInst::ICMP_EQ; in evaluateICmpRelation() 1431 ICmpInst::Predicate pred = ICmpInst::ICMP_EQ; in evaluateICmpRelation() 1435 pred = isSigned ? ICmpInst::ICMP_SLT : ICmpInst::ICMP_ULT; in evaluateICmpRelation() 1439 pred = isSigned ? ICmpInst::ICMP_SGT : ICmpInst::ICMP_UGT; in evaluateICmpRelation() 1445 return ICmpInst::BAD_ICMP_PREDICATE; in evaluateICmpRelation() 1449 ICmpInst::Predicate SwappedRelation = in evaluateICmpRelation() [all …]
|
D | Instructions.cpp | 3314 return new ICmpInst(InsertBefore, CmpInst::Predicate(predicate), in Create() 3317 return new ICmpInst(CmpInst::Predicate(predicate), in Create() 3333 return new ICmpInst(*InsertAtEnd, CmpInst::Predicate(predicate), in Create() 3341 if (ICmpInst *IC = dyn_cast<ICmpInst>(this)) in swapOperands() 3348 if (const ICmpInst *IC = dyn_cast<ICmpInst>(this)) in isCommutative() 3354 if (const ICmpInst *IC = dyn_cast<ICmpInst>(this)) in isEquality() 3393 void ICmpInst::anchor() {} in anchor() 3395 ICmpInst::Predicate ICmpInst::getSignedPredicate(Predicate pred) { in getSignedPredicate() 3408 ICmpInst::Predicate ICmpInst::getUnsignedPredicate(Predicate pred) { in getUnsignedPredicate() 3424 ICmpInst::makeConstantRange(Predicate pred, const APInt &C) { in makeConstantRange() [all …]
|
/external/llvm/lib/Analysis/ |
D | InstructionSimplify.cpp | 1464 static Value *simplifyUnsignedRangeCheck(ICmpInst *ZeroICmp, in simplifyUnsignedRangeCheck() 1465 ICmpInst *UnsignedICmp, bool IsAnd) { in simplifyUnsignedRangeCheck() 1468 ICmpInst::Predicate EqPred; in simplifyUnsignedRangeCheck() 1470 !ICmpInst::isEquality(EqPred)) in simplifyUnsignedRangeCheck() 1473 ICmpInst::Predicate UnsignedPred; in simplifyUnsignedRangeCheck() 1475 ICmpInst::isUnsigned(UnsignedPred)) in simplifyUnsignedRangeCheck() 1479 ICmpInst::isUnsigned(UnsignedPred)) in simplifyUnsignedRangeCheck() 1480 UnsignedPred = ICmpInst::getSwappedPredicate(UnsignedPred); in simplifyUnsignedRangeCheck() 1486 if (UnsignedPred == ICmpInst::ICMP_ULT && EqPred == ICmpInst::ICMP_NE) in simplifyUnsignedRangeCheck() 1491 if (UnsignedPred == ICmpInst::ICMP_UGE && !IsAnd) { in simplifyUnsignedRangeCheck() [all …]
|
D | ScalarEvolution.cpp | 1151 ICmpInst::Predicate *Pred, in getSignedOverflowLimitForStep() 1155 *Pred = ICmpInst::ICMP_SLT; in getSignedOverflowLimitForStep() 1160 *Pred = ICmpInst::ICMP_SGT; in getSignedOverflowLimitForStep() 1171 ICmpInst::Predicate *Pred, in getUnsignedOverflowLimitForStep() 1174 *Pred = ICmpInst::ICMP_ULT; in getUnsignedOverflowLimitForStep() 1206 ICmpInst::Predicate *Pred, in getOverflowLimitForStep() 1222 ICmpInst::Predicate *Pred, in getOverflowLimitForStep() 1301 ICmpInst::Predicate Pred; in getPreStartForExtend() 1392 ICmpInst::Predicate Pred = ICmpInst::BAD_ICMP_PREDICATE; in proveNoWrapByVaryingStart() 1523 if (isLoopBackedgeGuardedByCond(L, ICmpInst::ICMP_ULT, AR, N) || in getZeroExtendExpr() [all …]
|
D | LazyValueInfo.cpp | 778 static bool getValueFromFromCondition(Value *Val, ICmpInst *ICI, 800 if (ICmpInst *ICI = dyn_cast<ICmpInst>(C)) { in mergeAssumeBlockValueConstantRange() 896 bool getValueFromFromCondition(Value *Val, ICmpInst *ICI, in getValueFromFromCondition() 902 if (isTrueDest == (ICI->getPredicate() == ICmpInst::ICMP_EQ)) in getValueFromFromCondition() 912 if (ICI->getPredicate() == ICmpInst::ICMP_ULT) in getValueFromFromCondition() 962 if (ICmpInst *ICI = dyn_cast<ICmpInst>(BI->getCondition())) in getEdgeValueLocal() 1261 if (Pred == ICmpInst::ICMP_EQ) { in getPredicateResult() 1267 } else if (Pred == ICmpInst::ICMP_NE) { in getPredicateResult() 1277 ICmpInst::makeConstantRange((ICmpInst::Predicate)Pred, CI->getValue()); in getPredicateResult() 1288 if (Pred == ICmpInst::ICMP_EQ) { in getPredicateResult() [all …]
|
D | ValueTracking.cpp | 515 inline match_combine_or<CmpClass_match<LHS, RHS, ICmpInst, ICmpInst::Predicate>, 516 CmpClass_match<RHS, LHS, ICmpInst, ICmpInst::Predicate>> 517 m_c_ICmp(ICmpInst::Predicate &Pred, const LHS &L, const RHS &R) { in m_c_ICmp() 545 static void computeKnownBitsFromTrueCondition(Value *V, ICmpInst *Cmp, in computeKnownBitsFromTrueCondition() 567 case ICmpInst::ICMP_SGT: in computeKnownBitsFromTrueCondition() 577 case ICmpInst::ICMP_EQ: in computeKnownBitsFromTrueCondition() 590 case ICmpInst::ICMP_ULE: in computeKnownBitsFromTrueCondition() 599 case ICmpInst::ICMP_ULT: in computeKnownBitsFromTrueCondition() 671 ICmpInst *Cmp = dyn_cast<ICmpInst>(BI->getCondition()); in computeKnownBitsFromDominatingCondition() 699 ICmpInst *Cmp = dyn_cast<ICmpInst>(U); in computeKnownBitsFromDominatingCondition() [all …]
|
/external/llvm/include/llvm/Analysis/ |
D | ScalarEvolution.h | 614 ICmpInst *ExitCond, 631 ICmpInst::Predicate p); 642 ICmpInst::Predicate Pred); 678 bool isImpliedCond(ICmpInst::Predicate Pred, 686 bool isImpliedCond(ICmpInst::Predicate Pred, const SCEV *LHS, 687 const SCEV *RHS, ICmpInst::Predicate FoundPred, 693 bool isImpliedCondOperands(ICmpInst::Predicate Pred, 700 bool isImpliedCondOperandsHelper(ICmpInst::Predicate Pred, 708 bool isImpliedCondOperandsViaRanges(ICmpInst::Predicate Pred, 719 bool isImpliedCondOperandsViaNoOverflow(ICmpInst::Predicate Pred, [all …]
|
/external/llvm/lib/Transforms/Scalar/ |
D | InductiveRangeCheckElimination.cpp | 125 static RangeCheckKind parseRangeCheckICmp(Loop *L, ICmpInst *ICI, 266 InductiveRangeCheck::parseRangeCheckICmp(Loop *L, ICmpInst *ICI, in parseRangeCheckICmp() 281 ICmpInst::Predicate Pred = ICI->getPredicate(); in parseRangeCheckICmp() 289 case ICmpInst::ICMP_SLE: in parseRangeCheckICmp() 292 case ICmpInst::ICMP_SGE: in parseRangeCheckICmp() 299 case ICmpInst::ICMP_SLT: in parseRangeCheckICmp() 302 case ICmpInst::ICMP_SGT: in parseRangeCheckICmp() 315 case ICmpInst::ICMP_ULT: in parseRangeCheckICmp() 318 case ICmpInst::ICMP_UGT: in parseRangeCheckICmp() 344 ICmpInst *ICmpA = dyn_cast<ICmpInst>(A), *ICmpB = dyn_cast<ICmpInst>(B); in parseRangeCheck() [all …]
|
D | LoopIdiomRecognize.cpp | 732 ICmpInst *Cond = dyn_cast<ICmpInst>(BI->getCondition()); in matchCondition() 740 ICmpInst::Predicate Pred = Cond->getPredicate(); in matchCondition() 741 if ((Pred == ICmpInst::ICMP_NE && BI->getSuccessor(0) == LoopEntry) || in matchCondition() 742 (Pred == ICmpInst::ICMP_EQ && BI->getSuccessor(1) == LoopEntry)) in matchCondition() 989 ICmpInst *PreCond = cast<ICmpInst>(PreCondBr->getCondition()); in transformLoopToPopcount() 996 ICmpInst *NewPreCond = cast<ICmpInst>( in transformLoopToPopcount() 1026 ICmpInst *LbCond = cast<ICmpInst>(LbBr->getCondition()); in transformLoopToPopcount()
|
/external/llvm/lib/CodeGen/ |
D | Analysis.cpp | 200 ISD::CondCode llvm::getICmpCondCode(ICmpInst::Predicate Pred) { in getICmpCondCode() 202 case ICmpInst::ICMP_EQ: return ISD::SETEQ; in getICmpCondCode() 203 case ICmpInst::ICMP_NE: return ISD::SETNE; in getICmpCondCode() 204 case ICmpInst::ICMP_SLE: return ISD::SETLE; in getICmpCondCode() 205 case ICmpInst::ICMP_ULE: return ISD::SETULE; in getICmpCondCode() 206 case ICmpInst::ICMP_SGE: return ISD::SETGE; in getICmpCondCode() 207 case ICmpInst::ICMP_UGE: return ISD::SETUGE; in getICmpCondCode() 208 case ICmpInst::ICMP_SLT: return ISD::SETLT; in getICmpCondCode() 209 case ICmpInst::ICMP_ULT: return ISD::SETULT; in getICmpCondCode() 210 case ICmpInst::ICMP_SGT: return ISD::SETGT; in getICmpCondCode() [all …]
|
/external/llvm/include/llvm/Transforms/Utils/ |
D | CmpInstAnalysis.h | 21 class ICmpInst; variable 47 unsigned getICmpCode(const ICmpInst *ICI, bool InvertPred = false);
|
/external/llvm/lib/Target/NVPTX/ |
D | NVPTXLowerAggrCopies.cpp | 144 ICmpInst *PtrCompare = new ICmpInst(ConvertedInst, ICmpInst::ICMP_ULT, in convertMemMoveToLoop() 164 ICmpInst *CompareN = in convertMemMoveToLoop() 165 new ICmpInst(OrigBB->getTerminator(), ICmpInst::ICMP_EQ, CopyLen, in convertMemMoveToLoop()
|
/external/llvm/include/llvm/IR/ |
D | PatternMatch.h | 725 inline CmpClass_match<LHS, RHS, ICmpInst, ICmpInst::Predicate> 726 m_ICmp(ICmpInst::Predicate &Pred, const LHS &L, const RHS &R) { in m_ICmp() 727 return CmpClass_match<LHS, RHS, ICmpInst, ICmpInst::Predicate>(Pred, L, R); in m_ICmp() 986 static bool match(ICmpInst::Predicate Pred) { in match() 993 static bool match(ICmpInst::Predicate Pred) { in match() 1000 static bool match(ICmpInst::Predicate Pred) { in match() 1007 static bool match(ICmpInst::Predicate Pred) { in match() 1041 inline MaxMin_match<ICmpInst, LHS, RHS, smax_pred_ty> m_SMax(const LHS &L, in m_SMax() 1043 return MaxMin_match<ICmpInst, LHS, RHS, smax_pred_ty>(L, R); in m_SMax() 1047 inline MaxMin_match<ICmpInst, LHS, RHS, smin_pred_ty> m_SMin(const LHS &L, in m_SMin() [all …]
|
/external/llvm/unittests/IR/ |
D | InstructionsTest.cpp | 314 ICmpInst *ICmp0 = new ICmpInst(ICmpInst::ICMP_SGT, PtrVecA, PtrVecB); in TEST() 315 ICmpInst *ICmp1 = new ICmpInst(ICmpInst::ICMP_ULT, PtrVecA, PtrVecB); in TEST() 320 ICmpInst *ICmp2 = new ICmpInst(*BB0, ICmpInst::ICMP_SGE, PtrVecA, PtrVecB); in TEST()
|
D | ConstantRangeTest.cpp | 516 EXPECT_TRUE(ConstantRange::makeAllowedICmpRegion(ICmpInst::ICMP_SGT, SMax) in TEST() 525 EXPECT_EQ(ConstantRange::makeSatisfyingICmpRegion(ICmpInst::ICMP_NE, LowHalf), in TEST() 529 ConstantRange::makeSatisfyingICmpRegion(ICmpInst::ICMP_NE, HighHalf), in TEST() 532 EXPECT_TRUE(ConstantRange::makeSatisfyingICmpRegion(ICmpInst::ICMP_EQ, in TEST() 537 EXPECT_EQ(ConstantRange::makeSatisfyingICmpRegion(ICmpInst::ICMP_ULT, in TEST() 541 EXPECT_EQ(ConstantRange::makeSatisfyingICmpRegion(ICmpInst::ICMP_ULE, in TEST() 545 EXPECT_EQ(ConstantRange::makeSatisfyingICmpRegion(ICmpInst::ICMP_UGT, in TEST() 549 EXPECT_EQ(ConstantRange::makeSatisfyingICmpRegion(ICmpInst::ICMP_UGE, in TEST() 556 ConstantRange::makeSatisfyingICmpRegion(ICmpInst::ICMP_SLT, SignedSample), in TEST() 560 ConstantRange::makeSatisfyingICmpRegion(ICmpInst::ICMP_SLE, SignedSample), in TEST() [all …]
|
/external/llvm/lib/Target/CppBackend/ |
D | CPPBackend.cpp | 886 case ICmpInst::ICMP_EQ: Out << "EQ"; break; in printConstant() 887 case ICmpInst::ICMP_NE: Out << "NE"; break; in printConstant() 888 case ICmpInst::ICMP_SLT: Out << "SLT"; break; in printConstant() 889 case ICmpInst::ICMP_ULT: Out << "ULT"; break; in printConstant() 890 case ICmpInst::ICMP_SGT: Out << "SGT"; break; in printConstant() 891 case ICmpInst::ICMP_UGT: Out << "UGT"; break; in printConstant() 892 case ICmpInst::ICMP_SLE: Out << "SLE"; break; in printConstant() 893 case ICmpInst::ICMP_ULE: Out << "ULE"; break; in printConstant() 894 case ICmpInst::ICMP_SGE: Out << "SGE"; break; in printConstant() 895 case ICmpInst::ICMP_UGE: Out << "UGE"; break; in printConstant() [all …]
|
/external/llvm/examples/Fibonacci/ |
D | fibonacci.cpp | 64 Value *CondInst = new ICmpInst(*BB, ICmpInst::ICMP_SLE, ArgX, Two, "cond"); in CreateFibFunction()
|