Home
last modified time | relevance | path

Searched refs:Cmp (Results 1 – 25 of 123) sorted by relevance

12345

/third_party/flutter/skia/third_party/externals/wuffs/lang/check/
Dassert.go129 if nb[0].Cmp(cv) == 0 {
132 } else if nb[1].Cmp(cv) == 0 {
137 if nb[1].Cmp(cv) >= 0 {
142 if nb[1].Cmp(cv) > 0 {
150 if nb[0].Cmp(cv) < 0 {
155 if nb[0].Cmp(cv) <= 0 {
161 if changed && nb[0].Cmp(nb[1]) > 0 {
248 return lb[1].Cmp(rb[0]) < 0 || lb[0].Cmp(rb[1]) > 0
250 return lb[1].Cmp(rb[0]) < 0
252 return lb[1].Cmp(rb[0]) <= 0
[all …]
Doptimize.go86 if rcv.Cmp(advance) < 0 {
99 if rcv.Cmp(advance) == 0 {
/third_party/skia/third_party/externals/swiftshader/third_party/llvm-10.0/llvm/lib/Transforms/InstCombine/
DInstCombineCompares.cpp951 Value *Cmp = Builder.CreateICmp(ICmpInst::getSignedPredicate(Cond), in foldGEPICmp() local
953 return replaceInstUsesWith(I, Cmp); in foldGEPICmp()
1392 Instruction *InstCombiner::foldICmpWithZero(ICmpInst &Cmp) { in foldICmpWithZero() argument
1393 CmpInst::Predicate Pred = Cmp.getPredicate(); in foldICmpWithZero()
1394 if (!match(Cmp.getOperand(1), m_Zero())) in foldICmpWithZero()
1400 SelectPatternResult SPR = matchSelectPattern(Cmp.getOperand(0), A, B); in foldICmpWithZero()
1402 if (isKnownPositive(A, DL, 0, &AC, &Cmp, &DT)) in foldICmpWithZero()
1403 return new ICmpInst(Pred, B, Cmp.getOperand(1)); in foldICmpWithZero()
1404 if (isKnownPositive(B, DL, 0, &AC, &Cmp, &DT)) in foldICmpWithZero()
1405 return new ICmpInst(Pred, A, Cmp.getOperand(1)); in foldICmpWithZero()
[all …]
DInstCombineInternal.h919 Instruction *foldICmpUsingKnownBits(ICmpInst &Cmp);
920 Instruction *foldICmpWithDominatingICmp(ICmpInst &Cmp);
921 Instruction *foldICmpWithConstant(ICmpInst &Cmp);
922 Instruction *foldICmpInstWithConstant(ICmpInst &Cmp);
923 Instruction *foldICmpInstWithConstantNotInt(ICmpInst &Cmp);
924 Instruction *foldICmpBinOp(ICmpInst &Cmp, const SimplifyQuery &SQ);
925 Instruction *foldICmpEquality(ICmpInst &Cmp);
928 Instruction *foldICmpWithZero(ICmpInst &Cmp);
930 Value *foldUnsignedMultiplicationOverflowCheck(ICmpInst &Cmp);
932 Instruction *foldICmpSelectConstant(ICmpInst &Cmp, SelectInst *Select,
[all …]
DInstCombineSelect.cpp123 static Value *foldSelectICmpAnd(SelectInst &Sel, ICmpInst *Cmp, in foldSelectICmpAnd() argument
132 if (SelType->isVectorTy() != Cmp->getType()->isVectorTy()) in foldSelectICmpAnd()
138 ICmpInst::Predicate Pred = Cmp->getPredicate(); in foldSelectICmpAnd()
140 if (!match(Cmp->getOperand(1), m_Zero())) in foldSelectICmpAnd()
143 V = Cmp->getOperand(0); in foldSelectICmpAnd()
149 } else if (decomposeBitTestICmp(Cmp->getOperand(0), Cmp->getOperand(1), in foldSelectICmpAnd()
175 if (!Cmp->hasOneUse()) in foldSelectICmpAnd()
501 static Instruction *foldSelectICmpAndAnd(Type *SelType, const ICmpInst *Cmp, in foldSelectICmpAndAnd() argument
504 if (!(Cmp->hasOneUse() && Cmp->getOperand(0)->hasOneUse() && in foldSelectICmpAndAnd()
505 Cmp->getPredicate() == ICmpInst::ICMP_EQ && in foldSelectICmpAndAnd()
[all …]
DInstCombineCasts.cpp283 auto *Cmp = dyn_cast<CmpInst>(Sel->getCondition()); in commonCastTransforms() local
284 if (!Cmp || Cmp->getOperand(0)->getType() != Sel->getType()) in commonCastTransforms()
847 Instruction *InstCombiner::transformZExtICmp(ICmpInst *Cmp, ZExtInst &Zext, in transformZExtICmp() argument
853 if (match(Cmp->getOperand(1), m_APInt(Op1CV))) { in transformZExtICmp()
857 if ((Cmp->getPredicate() == ICmpInst::ICMP_SLT && Op1CV->isNullValue()) || in transformZExtICmp()
858 (Cmp->getPredicate() == ICmpInst::ICMP_SGT && Op1CV->isAllOnesValue())) { in transformZExtICmp()
859 if (!DoTransform) return Cmp; in transformZExtICmp()
861 Value *In = Cmp->getOperand(0); in transformZExtICmp()
868 if (Cmp->getPredicate() == ICmpInst::ICMP_SGT) { in transformZExtICmp()
886 Cmp->isEquality()) { in transformZExtICmp()
[all …]
DInstCombineMulDivRem.cpp771 Value *Cmp = Builder.CreateICmpULT(Inc, ConstantInt::get(Ty, 3)); in commonIDivTransforms() local
772 return SelectInst::Create(Cmp, Op1, ConstantInt::get(Ty, 0)); in commonIDivTransforms()
987 Value *Cmp = Builder.CreateICmpUGE(Op0, Op1); in visitUDiv() local
988 return CastInst::CreateZExtOrBitCast(Cmp, Ty); in visitUDiv()
992 Value *Cmp = Builder.CreateICmpEQ(Op0, ConstantInt::getAllOnesValue(Ty)); in visitUDiv() local
993 return CastInst::CreateZExtOrBitCast(Cmp, Ty); in visitUDiv()
1380 Value *Cmp = Builder.CreateICmpNE(Op1, ConstantInt::get(Ty, 1)); in visitURem() local
1381 return CastInst::CreateZExtOrBitCast(Cmp, Ty); in visitURem()
1386 Value *Cmp = Builder.CreateICmpULT(Op0, Op1); in visitURem() local
1388 return SelectInst::Create(Cmp, Op0, Sub); in visitURem()
[all …]
/third_party/skia/third_party/externals/swiftshader/third_party/llvm-10.0/llvm/lib/Target/Hexagon/
DHexagonHardwareLoops.cpp147 static Kind getSwappedComparison(Kind Cmp) { in getSwappedComparison()
148 assert ((!((Cmp & L) && (Cmp & G))) && "Malformed comparison operator"); in getSwappedComparison()
149 if ((Cmp & L) || (Cmp & G)) in getSwappedComparison()
150 return (Kind)(Cmp ^ (L|G)); in getSwappedComparison()
151 return Cmp; in getSwappedComparison()
154 static Kind getNegatedComparison(Kind Cmp) { in getNegatedComparison()
155 if ((Cmp & L) || (Cmp & G)) in getNegatedComparison()
156 return (Kind)((Cmp ^ (L | G)) ^ EQ); in getNegatedComparison()
157 if ((Cmp & NE) || (Cmp & EQ)) in getNegatedComparison()
158 return (Kind)(Cmp ^ (EQ | NE)); in getNegatedComparison()
[all …]
DHexagonConstPropagation.cpp347 static uint32_t negate(uint32_t Cmp) { in negate()
348 if (Cmp == EQ) in negate()
350 if (Cmp == NE) in negate()
352 assert((Cmp & (L|G)) != (L|G)); in negate()
353 return Cmp ^ (L|G); in negate()
365 bool evaluateCMPrr(uint32_t Cmp, const RegisterSubReg &R1, const RegisterSubReg &R2,
367 bool evaluateCMPri(uint32_t Cmp, const RegisterSubReg &R1, const APInt &A2,
369 bool evaluateCMPrp(uint32_t Cmp, const RegisterSubReg &R1, uint64_t Props2,
371 bool evaluateCMPii(uint32_t Cmp, const APInt &A1, const APInt &A2,
373 bool evaluateCMPpi(uint32_t Cmp, uint32_t Props, const APInt &A2,
[all …]
/third_party/skia/third_party/externals/swiftshader/third_party/llvm-10.0/llvm/lib/Target/AArch64/
DAArch64ConditionOptimizer.cpp112 CmpInfo adjustCmp(MachineInstr *CmpMI, AArch64CC::CondCode Cmp);
114 bool adjustTo(MachineInstr *CmpMI, AArch64CC::CondCode Cmp, MachineInstr *To,
229 static AArch64CC::CondCode getAdjustedCmp(AArch64CC::CondCode Cmp) { in getAdjustedCmp() argument
230 switch (Cmp) { in getAdjustedCmp()
243 MachineInstr *CmpMI, AArch64CC::CondCode Cmp) { in adjustCmp() argument
250 int Correction = (Cmp == AArch64CC::GT) ? 1 : -1; in adjustCmp()
266 return CmpInfo(NewImm, Opc, getAdjustedCmp(Cmp)); in adjustCmp()
274 AArch64CC::CondCode Cmp; in modifyCmp() local
275 std::tie(Imm, Opc, Cmp) = Info; in modifyCmp()
293 .addImm(Cmp) in modifyCmp()
[all …]
/third_party/flutter/skia/third_party/externals/wuffs/lib/interval/
Dinterval.go92 (x[0].extra == 0 && y.extra == 0 && x[0].i.Cmp(y.i) > 0) {
100 (x[1].extra == 0 && y.extra == 0 && x[1].i.Cmp(y.i) < 0) {
181 return x[1] == nil || x[0].Cmp(x[1]) <= 0
192 return x[0] == nil || x[0].Cmp(x[1]) <= 0
203 return (x[0] == nil || x[0].Cmp(i) <= 0) &&
204 (x[1] == nil || x[1].Cmp(i) >= 0)
214 if (x[0] != nil) && (y[0] == nil || x[0].Cmp(y[0]) > 0) {
217 if (x[1] != nil) && (y[1] == nil || x[1].Cmp(y[1]) < 0) {
230 } else if x0 && x[0].Cmp(y[0]) != 0 {
235 } else if x1 && x[1].Cmp(y[1]) != 0 {
[all …]
/third_party/skia/third_party/externals/swiftshader/third_party/llvm-10.0/llvm/lib/Target/AMDGPU/
DSIOptimizeExecMaskingPreRA.cpp225 auto *Cmp = TRI->findReachingDef(CmpReg, CmpSubReg, *And, MRI, LIS); in optimizeVcndVcmpPair() local
226 if (!Cmp || !(Cmp->getOpcode() == AMDGPU::V_CMP_NE_U32_e32 || in optimizeVcndVcmpPair()
227 Cmp->getOpcode() == AMDGPU::V_CMP_NE_U32_e64) || in optimizeVcndVcmpPair()
228 Cmp->getParent() != And->getParent()) in optimizeVcndVcmpPair()
231 MachineOperand *Op1 = TII->getNamedOperand(*Cmp, AMDGPU::OpName::src0); in optimizeVcndVcmpPair()
232 MachineOperand *Op2 = TII->getNamedOperand(*Cmp, AMDGPU::OpName::src1); in optimizeVcndVcmpPair()
239 auto *Sel = TRI->findReachingDef(SelReg, Op1->getSubReg(), *Cmp, MRI, LIS); in optimizeVcndVcmpPair()
254 LLVM_DEBUG(dbgs() << "Folding sequence:\n\t" << *Sel << '\t' << *Cmp << '\t' in optimizeVcndVcmpPair()
273 std::none_of(std::next(Cmp->getIterator()), Andn2->getIterator(), in optimizeVcndVcmpPair()
277 LLVM_DEBUG(dbgs() << "Erasing: " << *Cmp << '\n'); in optimizeVcndVcmpPair()
[all …]
/third_party/python/Lib/test/
Dtest_compare.py8 class Cmp: class
19 set1 = [2, 2.0, 2, 2+0j, Cmp(2.0)]
42 a = Cmp(1)
43 b = Cmp(1)
44 c = Cmp(2)
/third_party/skia/third_party/externals/swiftshader/third_party/llvm-10.0/llvm/lib/CodeGen/
DExpandMemCmp.cpp303 Value *Cmp = Builder.CreateICmp(ICmpInst::ICMP_NE, Diff, in emitLoadCompareByteBlock() local
306 BranchInst::Create(EndBlock, LoadCmpBlocks[BlockIndex + 1], Cmp); in emitLoadCompareByteBlock()
334 Value *Cmp = nullptr; in getCompareLoadPairs() local
377 Cmp = Builder.CreateICmpNE(LoadSrc1, LoadSrc2); in getCompareLoadPairs()
392 if (!Cmp) { in getCompareLoadPairs()
402 Cmp = Builder.CreateICmpNE(OrList[0], ConstantInt::get(Diff->getType(), 0)); in getCompareLoadPairs()
405 return Cmp; in getCompareLoadPairs()
410 Value *Cmp = getCompareLoadPairs(BlockIndex, LoadIndex); in emitLoadCompareBlockMultipleLoads() local
417 BranchInst *CmpBr = BranchInst::Create(ResBlock.BB, NextBB, Cmp); in emitLoadCompareBlockMultipleLoads()
482 Value *Cmp = Builder.CreateICmp(ICmpInst::ICMP_EQ, LoadSrc1, LoadSrc2); in emitLoadCompareBlock() local
[all …]
DCodeGenPrepare.cpp401 bool replaceMathCmpWithIntrinsic(BinaryOperator *BO, CmpInst *Cmp,
403 bool optimizeCmp(CmpInst *Cmp, bool &ModifiedDT);
404 bool combineToUSubWithOverflow(CmpInst *Cmp, bool &ModifiedDT);
405 bool combineToUAddWithOverflow(CmpInst *Cmp, bool &ModifiedDT);
1190 CmpInst *Cmp, in replaceMathCmpWithIntrinsic() argument
1192 if (BO->getParent() != Cmp->getParent()) { in replaceMathCmpWithIntrinsic()
1217 for (Instruction &Iter : *Cmp->getParent()) { in replaceMathCmpWithIntrinsic()
1218 if (&Iter == BO || &Iter == Cmp) { in replaceMathCmpWithIntrinsic()
1230 Cmp->replaceAllUsesWith(OV); in replaceMathCmpWithIntrinsic()
1232 Cmp->eraseFromParent(); in replaceMathCmpWithIntrinsic()
[all …]
/third_party/skia/third_party/externals/swiftshader/third_party/llvm-10.0/llvm/lib/Support/
DStatistic.cpp138 if (int Cmp = std::strcmp(LHS->getDebugType(), RHS->getDebugType())) in sort() local
139 return Cmp < 0; in sort()
141 if (int Cmp = std::strcmp(LHS->getName(), RHS->getName())) in sort() local
142 return Cmp < 0; in sort()
/third_party/skia/third_party/externals/swiftshader/third_party/llvm-10.0/llvm/lib/Transforms/Scalar/
DCallSiteSplitting.cpp111 static bool isCondRelevantToAnyCallArgument(ICmpInst *Cmp, CallSite CS) { in isCondRelevantToAnyCallArgument() argument
112 assert(isa<Constant>(Cmp->getOperand(1)) && "Expected a constant operand."); in isCondRelevantToAnyCallArgument()
113 Value *Op0 = Cmp->getOperand(0); in isCondRelevantToAnyCallArgument()
143 ICmpInst *Cmp = cast<ICmpInst>(Cond); in recordCondition() local
145 if (isCondRelevantToAnyCallArgument(Cmp, CS)) in recordCondition()
146 Conditions.push_back({Cmp, From->getTerminator()->getSuccessor(0) == To in recordCondition()
148 : Cmp->getInversePredicate()}); in recordCondition()
DInferAddressSpaces.cpp377 else if (ICmpInst *Cmp = dyn_cast<ICmpInst>(&I)) { in collectFlatAddressExpressions() local
379 if (Cmp->getOperand(0)->getType()->isPointerTy()) { in collectFlatAddressExpressions()
380 PushPtrOperand(Cmp->getOperand(0)); in collectFlatAddressExpressions()
381 PushPtrOperand(Cmp->getOperand(1)); in collectFlatAddressExpressions()
953 if (ICmpInst *Cmp = dyn_cast<ICmpInst>(CurUser)) { in rewriteWithNewAddressSpaces() local
963 Value *OtherSrc = Cmp->getOperand(OtherIdx); in rewriteWithNewAddressSpaces()
967 Cmp->setOperand(OtherIdx, OtherNewV); in rewriteWithNewAddressSpaces()
968 Cmp->setOperand(SrcIdx, NewV); in rewriteWithNewAddressSpaces()
976 Cmp->setOperand(SrcIdx, NewV); in rewriteWithNewAddressSpaces()
977 Cmp->setOperand(OtherIdx, in rewriteWithNewAddressSpaces()
DGVN.cpp1392 static bool impliesEquivalanceIfTrue(CmpInst* Cmp) { in impliesEquivalanceIfTrue() argument
1393 if (Cmp->getPredicate() == CmpInst::Predicate::ICMP_EQ) in impliesEquivalanceIfTrue()
1399 if (Cmp->getPredicate() == CmpInst::Predicate::FCMP_OEQ || in impliesEquivalanceIfTrue()
1400 (Cmp->getPredicate() == CmpInst::Predicate::FCMP_UEQ && in impliesEquivalanceIfTrue()
1401 Cmp->getFastMathFlags().noNaNs())) { in impliesEquivalanceIfTrue()
1402 Value *LHS = Cmp->getOperand(0); in impliesEquivalanceIfTrue()
1403 Value *RHS = Cmp->getOperand(1); in impliesEquivalanceIfTrue()
1418 static bool impliesEquivalanceIfFalse(CmpInst* Cmp) { in impliesEquivalanceIfFalse() argument
1419 if (Cmp->getPredicate() == CmpInst::Predicate::ICMP_NE) in impliesEquivalanceIfFalse()
1425 if ((Cmp->getPredicate() == CmpInst::Predicate::FCMP_ONE && in impliesEquivalanceIfFalse()
[all …]
DCorrelatedValuePropagation.cpp303 static bool processCmp(CmpInst *Cmp, LazyValueInfo *LVI) { in processCmp() argument
304 Value *Op0 = Cmp->getOperand(0); in processCmp()
305 auto *C = dyn_cast<Constant>(Cmp->getOperand(1)); in processCmp()
315 if (I && I->getParent() == Cmp->getParent()) in processCmp()
319 LVI->getPredicateAt(Cmp->getPredicate(), Op0, C, Cmp); in processCmp()
324 Constant *TorF = ConstantInt::get(Type::getInt1Ty(Cmp->getContext()), Result); in processCmp()
325 Cmp->replaceAllUsesWith(TorF); in processCmp()
326 Cmp->eraseFromParent(); in processCmp()
/third_party/skia/third_party/externals/swiftshader/third_party/llvm-subzero/include/llvm/IR/
DValue.h565 template <class Compare> void sortUseList(Compare Cmp);
580 static Use *mergeUseLists(Use *L, Use *R, Compare Cmp) { in mergeUseLists() argument
593 if (Cmp(*R, *L)) { in mergeUseLists()
611 static void mergeUseListsImpl(Use *L, Use *R, Use **Next, Compare Cmp);
639 template <class Compare> void Value::sortUseList(Compare Cmp) { in sortUseList() argument
676 Current = mergeUseLists(Slots[I], Current, Cmp); in sortUseList()
697 UseList = mergeUseLists(Slots[I], UseList, Cmp); in sortUseList()
/third_party/skia/third_party/externals/swiftshader/third_party/llvm-10.0/llvm/lib/Transforms/Utils/
DLibCallsShrinkWrap.cpp104 Value *createOrCond(CallInst *CI, CmpInst::Predicate Cmp, float Val, in createOrCond() argument
109 auto Cond1 = createCond(BBBuilder, Arg, Cmp, Val); in createOrCond()
114 Value *createCond(IRBuilder<> &BBBuilder, Value *Arg, CmpInst::Predicate Cmp, in createCond() argument
119 return BBBuilder.CreateFCmp(Cmp, Arg, V); in createCond()
123 Value *createCond(CallInst *CI, CmpInst::Predicate Cmp, float Val) { in createCond() argument
126 return createCond(BBBuilder, Arg, Cmp, Val); in createCond()
/third_party/skia/third_party/externals/swiftshader/third_party/llvm-10.0/llvm/lib/Target/AVR/
DAVRISelLowering.cpp446 SDValue Cmp; in getAVRCmp() local
551 Cmp = DAG.getNode(AVRISD::TST, DL, MVT::Glue, Top); in getAVRCmp()
553 Cmp = DAG.getNode(AVRISD::CMP, DL, MVT::Glue, LHSlo, RHSlo); in getAVRCmp()
554 Cmp = DAG.getNode(AVRISD::CMPC, DL, MVT::Glue, LHShi, RHShi, Cmp); in getAVRCmp()
589 Cmp = DAG.getNode(AVRISD::TST, DL, MVT::Glue, Top); in getAVRCmp()
591 Cmp = DAG.getNode(AVRISD::CMP, DL, MVT::Glue, LHS0, RHS0); in getAVRCmp()
592 Cmp = DAG.getNode(AVRISD::CMPC, DL, MVT::Glue, LHS1, RHS1, Cmp); in getAVRCmp()
593 Cmp = DAG.getNode(AVRISD::CMPC, DL, MVT::Glue, LHS2, RHS2, Cmp); in getAVRCmp()
594 Cmp = DAG.getNode(AVRISD::CMPC, DL, MVT::Glue, LHS3, RHS3, Cmp); in getAVRCmp()
599 Cmp = DAG.getNode(AVRISD::TST, DL, MVT::Glue, in getAVRCmp()
[all …]
/third_party/skia/third_party/externals/swiftshader/third_party/llvm-10.0/llvm/include/llvm/IR/
DValue.h671 template <class Compare> void sortUseList(Compare Cmp);
686 static Use *mergeUseLists(Use *L, Use *R, Compare Cmp) { in mergeUseLists() argument
699 if (Cmp(*R, *L)) { in mergeUseLists()
746 template <class Compare> void Value::sortUseList(Compare Cmp) { in sortUseList() argument
783 Current = mergeUseLists(Slots[I], Current, Cmp); in sortUseList()
804 UseList = mergeUseLists(Slots[I], UseList, Cmp); in sortUseList()
/third_party/skia/third_party/externals/swiftshader/third_party/llvm-10.0/llvm/lib/Analysis/
DIVDescriptors.cpp464 Instruction *Cmp = nullptr; in isMinMaxSelectCmpPattern() local
469 if ((Cmp = dyn_cast<ICmpInst>(I)) || (Cmp = dyn_cast<FCmpInst>(I))) { in isMinMaxSelectCmpPattern()
470 if (!Cmp->hasOneUse() || !(Select = dyn_cast<SelectInst>(*I->user_begin()))) in isMinMaxSelectCmpPattern()
478 if (!(Cmp = dyn_cast<ICmpInst>(I->getOperand(0))) && in isMinMaxSelectCmpPattern()
479 !(Cmp = dyn_cast<FCmpInst>(I->getOperand(0)))) in isMinMaxSelectCmpPattern()
481 if (!Cmp->hasOneUse()) in isMinMaxSelectCmpPattern()

12345