/freebsd/contrib/llvm-project/clang/include/clang/Analysis/Analyses/ |
H A D | ThreadSafetyTIL.h | 413 typename C::CType compare(const Variable* E, C& Cmp) const { in compare() argument 414 return Cmp.compareVariableRefs(this, E); in compare() 473 typename C::CType compare(const Future* E, C& Cmp) const { in compare() argument 475 return Cmp.comparePointers(this, E); in compare() 476 return Cmp.compare(Result, E->Result); in compare() 504 typename C::CType compare(const Undefined* E, C& Cmp) const { in compare() argument 505 return Cmp.trueResult(); in compare() 525 typename C::CType compare(const Wildcard* E, C& Cmp) const { in compare() argument 526 return Cmp.trueResult(); in compare() 557 typename C::CType compare(const Literal* E, C& Cmp) const { in compare() argument [all …]
|
/freebsd/contrib/llvm-project/llvm/lib/Target/Hexagon/ |
H A D | HexagonHardwareLoops.cpp | 147 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 …]
|
H A D | HexagonConstPropagation.cpp | 346 static uint32_t negate(uint32_t Cmp) { in negate() 347 if (Cmp == EQ) in negate() 349 if (Cmp == NE) in negate() 351 assert((Cmp & (L|G)) != (L|G)); in negate() 352 return Cmp ^ (L|G); in negate() 363 bool evaluateCMPrr(uint32_t Cmp, const RegisterSubReg &R1, const RegisterSubReg &R2, 365 bool evaluateCMPri(uint32_t Cmp, const RegisterSubReg &R1, const APInt &A2, 367 bool evaluateCMPrp(uint32_t Cmp, const RegisterSubReg &R1, uint64_t Props2, 369 bool evaluateCMPii(uint32_t Cmp, const APInt &A1, const APInt &A2, 371 bool evaluateCMPpi(uint32_t Cmp, uint32_ 1105 evaluateCMPrr(uint32_t Cmp,const RegisterSubReg & R1,const RegisterSubReg & R2,const CellMap & Inputs,bool & Result) evaluateCMPrr() argument 1144 evaluateCMPri(uint32_t Cmp,const RegisterSubReg & R1,const APInt & A2,const CellMap & Inputs,bool & Result) evaluateCMPri() argument 1171 evaluateCMPrp(uint32_t Cmp,const RegisterSubReg & R1,uint64_t Props2,const CellMap & Inputs,bool & Result) evaluateCMPrp() argument 1197 evaluateCMPii(uint32_t Cmp,const APInt & A1,const APInt & A2,bool & Result) evaluateCMPii() argument 1238 evaluateCMPpi(uint32_t Cmp,uint32_t Props,const APInt & A2,bool & Result) evaluateCMPpi() argument 1304 evaluateCMPpp(uint32_t Cmp,uint32_t Props1,uint32_t Props2,bool & Result) evaluateCMPpp() argument 2600 uint32_t Cmp = getCmp(Opc); evaluateHexCompare2() local [all...] |
/freebsd/contrib/llvm-project/llvm/lib/Transforms/InstCombine/ |
H A D | InstCombineInternal.h | 308 Instruction *transformZExtICmp(ICmpInst *Cmp, ZExtInst &Zext); 310 Instruction *transformSExtICmp(ICmpInst *Cmp, SExtInst &Sext); 661 Instruction *foldICmpUsingKnownBits(ICmpInst &Cmp); 662 Instruction *foldICmpWithDominatingICmp(ICmpInst &Cmp); 663 Instruction *foldICmpWithConstant(ICmpInst &Cmp); 665 Instruction *foldICmpInstWithConstant(ICmpInst &Cmp); 666 Instruction *foldICmpInstWithConstantNotInt(ICmpInst &Cmp); 667 Instruction *foldICmpInstWithConstantAllowPoison(ICmpInst &Cmp, 669 Instruction *foldICmpBinOp(ICmpInst &Cmp, const SimplifyQuery &SQ); 672 Instruction *foldICmpEquality(ICmpInst &Cmp); [all …]
|
H A D | InstCombineCompares.cpp | 774 Value *Cmp = Builder.CreateICmp(ICmpInst::getSignedPredicate(Cond), in foldGEPICmp() local 776 return replaceInstUsesWith(I, Cmp); in foldGEPICmp() 1202 Instruction *InstCombinerImpl::foldICmpWithZero(ICmpInst &Cmp) { in foldICmpWithZero() argument 1203 CmpInst::Predicate Pred = Cmp.getPredicate(); in foldICmpWithZero() 1204 if (!match(Cmp.getOperand(1), m_Zero())) in foldICmpWithZero() 1210 if (match(Cmp.getOperand(0), m_SMin(m_Value(A), m_Value(B)))) { in foldICmpWithZero() 1211 if (isKnownPositive(A, SQ.getWithInstruction(&Cmp))) in foldICmpWithZero() 1212 return new ICmpInst(Pred, B, Cmp.getOperand(1)); in foldICmpWithZero() 1213 if (isKnownPositive(B, SQ.getWithInstruction(&Cmp))) in foldICmpWithZero() 1214 return new ICmpInst(Pred, A, Cmp.getOperand(1)); in foldICmpWithZero() [all …]
|
H A D | InstCombineSelect.cpp | 122 static Value *foldSelectICmpAnd(SelectInst &Sel, ICmpInst *Cmp, in foldSelectICmpAnd() argument 131 if (SelType->isVectorTy() != Cmp->getType()->isVectorTy()) in foldSelectICmpAnd() 137 ICmpInst::Predicate Pred = Cmp->getPredicate(); in foldSelectICmpAnd() 139 if (!match(Cmp->getOperand(1), m_Zero())) in foldSelectICmpAnd() 142 V = Cmp->getOperand(0); in foldSelectICmpAnd() 148 } else if (decomposeBitTestICmp(Cmp->getOperand(0), Cmp->getOperand(1), in foldSelectICmpAnd() 174 if (!Cmp->hasOneUse()) in foldSelectICmpAnd() 586 static Instruction *foldSelectICmpAndAnd(Type *SelType, const ICmpInst *Cmp, in foldSelectICmpAndAnd() argument 589 if (!(Cmp->hasOneUse() && Cmp->getOperand(0)->hasOneUse() && in foldSelectICmpAndAnd() 590 Cmp->getPredicate() == ICmpInst::ICMP_EQ && in foldSelectICmpAndAnd() [all …]
|
H A D | InstCombineCasts.cpp | 181 auto *Cmp = dyn_cast<CmpInst>(Sel->getCondition()); in commonCastTransforms() local 182 if (!Cmp || Cmp->getOperand(0)->getType() != Sel->getType() || in commonCastTransforms() 797 Constant *Cmp = in visitTrunc() local 799 Constant *ShAmt = ConstantFoldSelectInstruction(Cmp, C, MaxAmt); in visitTrunc() 924 Instruction *InstCombinerImpl::transformZExtICmp(ICmpInst *Cmp, in transformZExtICmp() argument 937 if (match(Cmp->getOperand(1), m_APInt(Op1CV))) { in transformZExtICmp() 940 if (Cmp->getPredicate() == ICmpInst::ICMP_SLT && Op1CV->isZero()) { in transformZExtICmp() 941 Value *In = Cmp->getOperand(0); in transformZExtICmp() 956 if (Op1CV->isZero() && Cmp->isEquality()) { in transformZExtICmp() 959 KnownBits Known = computeKnownBits(Cmp->getOperand(0), 0, &Zext); in transformZExtICmp() [all …]
|
/freebsd/contrib/llvm-project/llvm/lib/Target/AArch64/ |
H A D | AArch64ConditionOptimizer.cpp | 112 CmpInfo adjustCmp(MachineInstr *CmpMI, AArch64CC::CondCode Cmp); 114 bool adjustTo(MachineInstr *CmpMI, AArch64CC::CondCode Cmp, MachineInstr *To, 230 static AArch64CC::CondCode getAdjustedCmp(AArch64CC::CondCode Cmp) { in getAdjustedCmp() argument 231 switch (Cmp) { in getAdjustedCmp() 244 MachineInstr *CmpMI, AArch64CC::CondCode Cmp) { in adjustCmp() argument 251 int Correction = (Cmp == AArch64CC::GT) ? 1 : -1; in adjustCmp() 267 return CmpInfo(NewImm, Opc, getAdjustedCmp(Cmp)); in adjustCmp() 275 AArch64CC::CondCode Cmp; in modifyCmp() local 276 std::tie(Imm, Opc, Cmp) = Info; in modifyCmp() 294 .addImm(Cmp) in modifyCmp() [all …]
|
/freebsd/contrib/llvm-project/llvm/lib/Target/AMDGPU/ |
H A D | SIOptimizeExecMaskingPreRA.cpp | 148 auto *Cmp = TRI->findReachingDef(CmpReg, CmpSubReg, *And, *MRI, LIS); in optimizeVcndVcmpPair() local 149 if (!Cmp || !(Cmp->getOpcode() == AMDGPU::V_CMP_NE_U32_e32 || in optimizeVcndVcmpPair() 150 Cmp->getOpcode() == AMDGPU::V_CMP_NE_U32_e64) || in optimizeVcndVcmpPair() 151 Cmp->getParent() != And->getParent()) in optimizeVcndVcmpPair() 154 MachineOperand *Op1 = TII->getNamedOperand(*Cmp, AMDGPU::OpName::src0); in optimizeVcndVcmpPair() 155 MachineOperand *Op2 = TII->getNamedOperand(*Cmp, AMDGPU::OpName::src1); in optimizeVcndVcmpPair() 165 auto *Sel = TRI->findReachingDef(SelReg, Op1->getSubReg(), *Cmp, *MRI, LIS); in optimizeVcndVcmpPair() 198 LLVM_DEBUG(dbgs() << "Folding sequence:\n\t" << *Sel << '\t' << *Cmp << '\t' in optimizeVcndVcmpPair() 219 SlotIndex CmpIdx = LIS->getInstructionIndex(*Cmp); in optimizeVcndVcmpPair() 235 std::none_of(std::next(Cmp->getIterator()), Andn2->getIterator(), in optimizeVcndVcmpPair() [all …]
|
/freebsd/contrib/llvm-project/llvm/utils/TableGen/Common/ |
H A D | OptEmitter.cpp | 54 if (int Cmp = StrCmpOptionName(A->getValueAsString("Name").str().c_str(), in CompareOptionRecords() local 56 return Cmp; in CompareOptionRecords() 67 if (int Cmp = StrCmpOptionName(APre->str().c_str(), BPre->str().c_str())) in CompareOptionRecords() local 68 return Cmp; in CompareOptionRecords()
|
/freebsd/contrib/llvm-project/llvm/lib/Transforms/Utils/ |
H A D | LibCallsShrinkWrap.cpp | 83 Value *createOrCond(CallInst *CI, Value *Arg, CmpInst::Predicate Cmp, in createOrCond() argument 88 auto Cond1 = createCond(BBBuilder, Arg, Cmp, Val); in createOrCond() 93 Value *createOrCond(CallInst *CI, CmpInst::Predicate Cmp, float Val, in createOrCond() argument 96 return createOrCond(CI, Arg, Cmp, Val, Arg, Cmp2, Val2); in createOrCond() 100 Value *createCond(IRBuilder<> &BBBuilder, Value *Arg, CmpInst::Predicate Cmp, in createCond() argument 107 return BBBuilder.CreateFCmp(Cmp, Arg, V); in createCond() 111 Value *createCond(CallInst *CI, Value *Arg, CmpInst::Predicate Cmp, in createCond() argument 114 return createCond(BBBuilder, Arg, Cmp, Val); in createCond() 118 Value *createCond(CallInst *CI, CmpInst::Predicate Cmp, float Val) { in createCond() argument 120 return createCond(CI, Arg, Cmp, Val); in createCond()
|
H A D | LowerAtomic.cpp | 25 Value *Cmp = CXI->getCompareOperand(); in lowerAtomicCmpXchgInst() local 29 Value *Equal = Builder.CreateICmpEQ(Orig, Cmp); in lowerAtomicCmpXchgInst() 83 Value *Cmp = Builder.CreateICmpUGE(Loaded, Val); in buildAtomicRMWValue() local 85 return Builder.CreateSelect(Cmp, Zero, Inc, "new"); in buildAtomicRMWValue()
|
H A D | PredicateInfo.cpp | 409 if (auto *Cmp = dyn_cast<CmpInst>(Cond)) in processAssume() local 410 collectCmpOps(Cmp, Values); in processAssume() 455 if (auto *Cmp = dyn_cast<CmpInst>(Cond)) in processBranch() local 456 collectCmpOps(Cmp, Values); in processBranch() 791 CmpInst *Cmp = dyn_cast<CmpInst>(Condition); in getConstraint() local 792 if (!Cmp) { in getConstraint() 799 if (Cmp->getOperand(0) == RenamedOp) { in getConstraint() 800 Pred = Cmp->getPredicate(); in getConstraint() 801 OtherOp = Cmp->getOperand(1); in getConstraint() 802 } else if (Cmp->getOperand(1) == RenamedOp) { in getConstraint() [all …]
|
/freebsd/contrib/llvm-project/compiler-rt/lib/scudo/standalone/ |
H A D | atomic_helpers.h | 116 inline bool atomic_compare_exchange_strong(volatile T *A, typename T::Type *Cmp, in atomic_compare_exchange_strong() argument 119 return __atomic_compare_exchange(&A->ValDoNotUse, Cmp, &Xchg, false, MO, in atomic_compare_exchange_strong() 137 atomic_compare_exchange_strong(volatile T *A, typename T::Type Cmp, in atomic_compare_exchange() argument 139 atomic_compare_exchange_strong(A, &Cmp, Xchg, MO); in atomic_compare_exchange() 140 return Cmp; in atomic_compare_exchange()
|
/freebsd/contrib/llvm-project/llvm/lib/CodeGen/ |
H A D | ExpandMemCmp.cpp | 390 Value *Cmp = Builder.CreateICmp(ICmpInst::ICMP_NE, Diff, in emitLoadCompareByteBlock() local 393 BranchInst::Create(EndBlock, LoadCmpBlocks[BlockIndex + 1], Cmp); in emitLoadCompareByteBlock() 427 Value *Cmp = nullptr; in getCompareLoadPairs() local 449 Cmp = Builder.CreateICmpNE(Loads.Lhs, Loads.Rhs); in getCompareLoadPairs() 464 if (!Cmp) { in getCompareLoadPairs() 474 Cmp = Builder.CreateICmpNE(OrList[0], ConstantInt::get(Diff->getType(), 0)); in getCompareLoadPairs() 477 return Cmp; in getCompareLoadPairs() 482 Value *Cmp = getCompareLoadPairs(BlockIndex, LoadIndex); in emitLoadCompareBlockMultipleLoads() local 490 BranchInst *CmpBr = BranchInst::Create(ResBlock.BB, NextBB, Cmp); in emitLoadCompareBlockMultipleLoads() 547 Value *Cmp = Builder.CreateICmp(ICmpInst::ICMP_EQ, Loads.Lhs, Loads.Rhs); in emitLoadCompareBlock() local [all …]
|
H A D | CodeGenPrepare.cpp | 472 CmpInst *Cmp, Intrinsic::ID IID); 473 bool optimizeCmp(CmpInst *Cmp, ModifyDT &ModifiedDT); 474 bool combineToUSubWithOverflow(CmpInst *Cmp, ModifyDT &ModifiedDT); 475 bool combineToUAddWithOverflow(CmpInst *Cmp, ModifyDT &ModifiedDT); 1552 CmpInst *Cmp, in replaceMathCmpWithIntrinsic() argument 1554 auto IsReplacableIVIncrement = [this, &Cmp](BinaryOperator *BO) { in replaceMathCmpWithIntrinsic() 1560 if (LI->getLoopFor(Cmp->getParent()) != L) in replaceMathCmpWithIntrinsic() 1567 if (DT.dominates(Cmp->getParent(), BO->getParent())) in replaceMathCmpWithIntrinsic() 1573 return BO->hasOneUse() && DT.dominates(Cmp->getParent(), L->getLoopLatch()); in replaceMathCmpWithIntrinsic() 1575 if (BO->getParent() != Cmp->getParent() && !IsReplacableIVIncrement(BO)) { in replaceMathCmpWithIntrinsic() [all …]
|
/freebsd/contrib/llvm-project/llvm/lib/Transforms/Scalar/ |
H A D | CorrelatedValuePropagation.cpp | 287 static bool processICmp(ICmpInst *Cmp, LazyValueInfo *LVI) { in processICmp() argument 289 if (!Cmp->getOperand(0)->getType()->isIntOrIntVectorTy()) in processICmp() 292 if (!Cmp->isSigned()) in processICmp() 297 Cmp->getPredicate(), in processICmp() 298 LVI->getConstantRangeAtUse(Cmp->getOperandUse(0), in processICmp() 300 LVI->getConstantRangeAtUse(Cmp->getOperandUse(1), in processICmp() 307 Cmp->setPredicate(UnsignedPred); in processICmp() 316 static bool constantFoldCmp(CmpInst *Cmp, LazyValueInfo *LVI) { in constantFoldCmp() argument 317 Value *Op0 = Cmp->getOperand(0); in constantFoldCmp() 318 Value *Op1 = Cmp->getOperand(1); in constantFoldCmp() [all …]
|
H A D | CallSiteSplitting.cpp | 109 static bool isCondRelevantToAnyCallArgument(ICmpInst *Cmp, CallBase &CB) { in isCondRelevantToAnyCallArgument() argument 110 assert(isa<Constant>(Cmp->getOperand(1)) && "Expected a constant operand."); in isCondRelevantToAnyCallArgument() 111 Value *Op0 = Cmp->getOperand(0); in isCondRelevantToAnyCallArgument() 140 ICmpInst *Cmp = cast<ICmpInst>(Cond); in recordCondition() local 142 if (isCondRelevantToAnyCallArgument(Cmp, CB)) in recordCondition() 143 Conditions.push_back({Cmp, From->getTerminator()->getSuccessor(0) == To in recordCondition() 145 : Cmp->getInversePredicate()}); in recordCondition()
|
H A D | MergeICmps.cpp | 205 BCECmpBlock(BCECmp Cmp, BasicBlock *BB, InstructionSet BlockInsts) in BCECmpBlock() argument 206 : BB(BB), BlockInsts(std::move(BlockInsts)), Cmp(std::move(Cmp)) {} in BCECmpBlock() 208 const BCEAtom &Lhs() const { return Cmp.Lhs; } in Lhs() 209 const BCEAtom &Rhs() const { return Cmp.Rhs; } in Rhs() 210 int SizeBits() const { return Cmp.SizeBits; } in SizeBits() 240 BCECmp Cmp; member in __anonde3b773f0111::BCECmpBlock 254 if (MayClobber(Cmp.Lhs.LoadI) || MayClobber(Cmp.Rhs.LoadI)) in canSinkBCECmpInst() 575 [](int i, const BCECmpBlock &Cmp) { in makeName() argument 576 return i + Cmp.BB->getName().size(); in makeName()
|
H A D | ConstraintElimination.cpp | 1058 if (auto Cmp = dyn_cast<ICmpInst>(&I)) { in addInfoFor() local 1059 for (Use &U : Cmp->uses()) { in addInfoFor() 1158 if (auto *Cmp = dyn_cast<ICmpInst>(Cur)) { in addInfoFor() local 1161 IsOr ? CmpInst::getInversePredicate(Cmp->getPredicate()) in addInfoFor() 1162 : Cmp->getPredicate(), in addInfoFor() 1163 Cmp->getOperand(0), Cmp->getOperand(1))); in addInfoFor() 1342 auto *Cmp = Builder.CreateICmp(Entry.Pred, Entry.LHS, Entry.RHS); in generateReproducer() local 1343 Builder.CreateAssumption(Cmp); in generateReproducer() 1397 CmpInst *Cmp, ConstraintInfo &Info, unsigned NumIn, unsigned NumOut, in checkAndReplaceCondition() argument 1401 auto ReplaceCmpWithConstant = [&](CmpInst *Cmp, bool IsTrue) { in checkAndReplaceCondition() argument [all …]
|
/freebsd/contrib/llvm-project/llvm/lib/Support/ |
H A D | Statistic.cpp | 144 if (int Cmp = std::strcmp(LHS->getDebugType(), RHS->getDebugType())) in sort() local 145 return Cmp < 0; in sort() 147 if (int Cmp = std::strcmp(LHS->getName(), RHS->getName())) in sort() local 148 return Cmp < 0; in sort()
|
/freebsd/contrib/llvm-project/clang/lib/Analysis/FlowSensitive/Models/ |
H A D | UncheckedOptionalAccessModel.cpp | 834 [](const clang::CXXOperatorCallExpr *Cmp, in buildTransferMatchSwitch() 836 transferOptionalAndNulloptCmp(Cmp, Cmp->getArg(0), State.Env); in buildTransferMatchSwitch() 840 [](const clang::CXXOperatorCallExpr *Cmp, in buildTransferMatchSwitch() argument 842 transferOptionalAndNulloptCmp(Cmp, Cmp->getArg(1), State.Env); in buildTransferMatchSwitch() 848 [](const clang::CXXOperatorCallExpr *Cmp, in buildTransferMatchSwitch() argument 850 transferOptionalAndValueCmp(Cmp, Cmp->getArg(0), State.Env); in buildTransferMatchSwitch() 856 [](const clang::CXXOperatorCallExpr *Cmp, in buildTransferMatchSwitch() argument 858 transferOptionalAndValueCmp(Cmp, Cmp->getArg(1), State.Env); in buildTransferMatchSwitch()
|
/freebsd/contrib/llvm-project/clang/include/clang/ASTMatchers/ |
H A D | GtestMatchers.h | 45 internal::BindableMatcher<Stmt> gtestAssert(GtestCmp Cmp, StatementMatcher Left, 54 internal::BindableMatcher<Stmt> gtestExpect(GtestCmp Cmp, StatementMatcher Left,
|
/freebsd/contrib/llvm-project/llvm/lib/Target/AVR/ |
H A D | AVRISelLowering.cpp | 644 SDValue Cmp; in getAVRCmp() local 662 Cmp = DAG.getNode(AVRISD::CMP, DL, MVT::Glue, LHSlo, RHSlo); in getAVRCmp() 663 Cmp = DAG.getNode(AVRISD::CMPC, DL, MVT::Glue, LHShi, RHShi, Cmp); in getAVRCmp() 680 Cmp = DAG.getNode(AVRISD::CMP, DL, MVT::Glue, LHSlo, RHSlo); in getAVRCmp() 681 Cmp = DAG.getNode(AVRISD::CMPC, DL, MVT::Glue, LHShi, RHShi, Cmp); in getAVRCmp() 684 Cmp = DAG.getNode(AVRISD::CMP, DL, MVT::Glue, LHS, RHS); in getAVRCmp() 687 return Cmp; in getAVRCmp() 695 SDValue Cmp; in getAVRCmp() local 800 Cmp = DAG.getNode(AVRISD::TST, DL, MVT::Glue, Top); in getAVRCmp() 802 Cmp = getAVRCmp(LHSlo, RHSlo, DAG, DL); in getAVRCmp() [all …]
|
/freebsd/contrib/llvm-project/llvm/include/llvm/IR/ |
H A D | MatrixBuilder.h | 235 auto *Cmp = B.CreateICmpULT(Idx, NumElts); 236 if (isa<ConstantInt>(Cmp)) 237 assert(cast<ConstantInt>(Cmp)->isOne() && "Index must be valid!"); 239 B.CreateAssumption(Cmp);
|