| /freebsd/contrib/llvm-project/llvm/lib/CodeGen/GlobalISel/ |
| H A D | CombinerHelperCompares.cpp | 93 const GICmp *Cmp = cast<GICmp>(&MI); in matchCanonicalizeICmp() local 95 Register Dst = Cmp->getReg(0); in matchCanonicalizeICmp() 96 Register LHS = Cmp->getLHSReg(); in matchCanonicalizeICmp() 97 Register RHS = Cmp->getRHSReg(); in matchCanonicalizeICmp() 99 CmpInst::Predicate Pred = Cmp->getCond(); in matchCanonicalizeICmp() 103 return constantFoldICmp(*Cmp, *CLHS, *CRHS, MatchInfo); in matchCanonicalizeICmp() 118 const GFCmp *Cmp = cast<GFCmp>(&MI); in matchCanonicalizeFCmp() local 120 Register Dst = Cmp->getReg(0); in matchCanonicalizeFCmp() 121 Register LHS = Cmp->getLHSReg(); in matchCanonicalizeFCmp() 122 Register RHS = Cmp->getRHSReg(); in matchCanonicalizeFCmp() [all …]
|
| /freebsd/contrib/llvm-project/clang/include/clang/Analysis/Analyses/ |
| H A D | ThreadSafetyTIL.h | 414 typename C::CType compare(const Variable* E, C& Cmp) const { in compare() argument 415 return Cmp.compareVariableRefs(this, E); in compare() 474 typename C::CType compare(const Future* E, C& Cmp) const { in compare() argument 476 return Cmp.comparePointers(this, E); in compare() 477 return Cmp.compare(Result, E->Result); in compare() 505 typename C::CType compare(const Undefined* E, C& Cmp) const { in compare() argument 506 return Cmp.trueResult(); in compare() 526 typename C::CType compare(const Wildcard* E, C& Cmp) const { in compare() argument 527 return Cmp.trueResult(); in compare() 558 typename C::CType compare(const Literal* E, C& Cmp) const { in compare() argument [all …]
|
| /freebsd/contrib/llvm-project/clang/lib/ASTMatchers/ |
| H A D | GtestMatchers.cpp | 33 static DeclarationMatcher getComparisonDecl(GtestCmp Cmp) { in getComparisonDecl() argument 34 switch (Cmp) { in getComparisonDecl() 65 static llvm::StringRef getComparisonTypeName(GtestCmp Cmp) { in getComparisonTypeName() argument 66 switch (Cmp) { in getComparisonTypeName() 83 static std::string getMacroName(MacroType Macro, GtestCmp Cmp) { in getMacroName() argument 84 return (getMacroTypeName(Macro) + "_" + getComparisonTypeName(Cmp)).str(); in getMacroName() 117 gtestComparisonInternal(MacroType Macro, GtestCmp Cmp, StatementMatcher Left, in gtestComparisonInternal() argument 119 return callExpr(isExpandedFromMacro(getMacroName(Macro, Cmp)), in gtestComparisonInternal() 120 callee(getComparisonDecl(Cmp)), hasArgument(2, Left), in gtestComparisonInternal() 185 internal::BindableMatcher<Stmt> gtestAssert(GtestCmp Cmp, StatementMatcher Left, in gtestAssert() argument [all …]
|
| /freebsd/contrib/llvm-project/llvm/lib/Target/Hexagon/ |
| H A D | HexagonHardwareLoops.cpp | 140 static Kind getSwappedComparison(Kind Cmp) { in getSwappedComparison() 141 assert ((!((Cmp & L) && (Cmp & G))) && "Malformed comparison operator"); in getSwappedComparison() 142 if ((Cmp & L) || (Cmp & G)) in getSwappedComparison() 143 return (Kind)(Cmp ^ (L|G)); in getSwappedComparison() 144 return Cmp; in getSwappedComparison() 147 static Kind getNegatedComparison(Kind Cmp) { in getNegatedComparison() 148 if ((Cmp & L) || (Cmp & G)) in getNegatedComparison() 149 return (Kind)((Cmp ^ (L | G)) ^ EQ); in getNegatedComparison() 150 if ((Cmp & NE) || (Cmp & EQ)) in getNegatedComparison() 151 return (Kind)(Cmp ^ (EQ | NE)); in getNegatedComparison() [all …]
|
| H A D | HexagonConstPropagation.cpp | 325 static uint32_t negate(uint32_t Cmp) { in negate() 326 if (Cmp == EQ) in negate() 328 if (Cmp == NE) in negate() 330 assert((Cmp & (L|G)) != (L|G)); in negate() 331 return Cmp ^ (L|G); in negate() 343 bool evaluateCMPrr(uint32_t Cmp, const RegSubRegPair &R1, 346 bool evaluateCMPri(uint32_t Cmp, const RegSubRegPair &R1, const APInt &A2, 348 bool evaluateCMPrp(uint32_t Cmp, const RegSubRegPair &R1, uint64_t Props2, 350 bool evaluateCMPii(uint32_t Cmp, const APInt &A1, const APInt &A2, 352 bool evaluateCMPpi(uint32_t Cmp, uint32_t Props, const APInt &A2, [all …]
|
| /freebsd/contrib/llvm-project/llvm/lib/Transforms/InstCombine/ |
| H A D | InstCombineInternal.h | 309 Instruction *transformZExtICmp(ICmpInst *Cmp, ZExtInst &Zext); 311 Instruction *transformSExtICmp(ICmpInst *Cmp, SExtInst &Sext); 708 Instruction *foldICmpUsingKnownBits(ICmpInst &Cmp); 709 Instruction *foldICmpWithDominatingICmp(ICmpInst &Cmp); 710 Instruction *foldICmpWithConstant(ICmpInst &Cmp); 712 Instruction *foldICmpInstWithConstant(ICmpInst &Cmp); 713 Instruction *foldICmpInstWithConstantNotInt(ICmpInst &Cmp); 714 Instruction *foldICmpInstWithConstantAllowPoison(ICmpInst &Cmp, 716 Instruction *foldICmpBinOp(ICmpInst &Cmp, const SimplifyQuery &SQ); 719 Instruction *foldICmpEquality(ICmpInst &Cmp); [all …]
|
| H A D | InstCombineCompares.cpp | 801 Value *Cmp = Builder.CreateICmp(ICmpInst::getSignedPredicate(Cond), in foldGEPICmp() local 803 return replaceInstUsesWith(I, Cmp); in foldGEPICmp() 1230 Instruction *InstCombinerImpl::foldICmpWithZero(ICmpInst &Cmp) { in foldICmpWithZero() argument 1231 CmpInst::Predicate Pred = Cmp.getPredicate(); in foldICmpWithZero() 1232 if (!match(Cmp.getOperand(1), m_Zero())) in foldICmpWithZero() 1238 if (match(Cmp.getOperand(0), m_SMin(m_Value(A), m_Value(B)))) { in foldICmpWithZero() 1239 if (isKnownPositive(A, SQ.getWithInstruction(&Cmp))) in foldICmpWithZero() 1240 return new ICmpInst(Pred, B, Cmp.getOperand(1)); in foldICmpWithZero() 1241 if (isKnownPositive(B, SQ.getWithInstruction(&Cmp))) in foldICmpWithZero() 1242 return new ICmpInst(Pred, A, Cmp.getOperand(1)); in foldICmpWithZero() [all …]
|
| H A D | InstCombineCasts.cpp | 183 auto *Cmp = dyn_cast<CmpInst>(Sel->getCondition()); in commonCastTransforms() local 184 if (!Cmp || Cmp->getOperand(0)->getType() != Sel->getType() || in commonCastTransforms() 870 Constant *Cmp = in visitTrunc() local 872 Constant *ShAmt = ConstantFoldSelectInstruction(Cmp, C, MaxAmt); in visitTrunc() 971 Instruction *InstCombinerImpl::transformZExtICmp(ICmpInst *Cmp, in transformZExtICmp() argument 984 if (match(Cmp->getOperand(1), m_APInt(Op1CV))) { in transformZExtICmp() 987 if (Cmp->getPredicate() == ICmpInst::ICMP_SLT && Op1CV->isZero()) { in transformZExtICmp() 988 Value *In = Cmp->getOperand(0); in transformZExtICmp() 1003 if (Op1CV->isZero() && Cmp->isEquality()) { in transformZExtICmp() 1006 KnownBits Known = computeKnownBits(Cmp->getOperand(0), &Zext); in transformZExtICmp() [all …]
|
| /freebsd/contrib/llvm-project/llvm/lib/Target/AArch64/ |
| H A D | AArch64ConditionOptimizer.cpp | 110 CmpInfo adjustCmp(MachineInstr *CmpMI, AArch64CC::CondCode Cmp); 112 bool adjustTo(MachineInstr *CmpMI, AArch64CC::CondCode Cmp, MachineInstr *To, 228 static AArch64CC::CondCode getAdjustedCmp(AArch64CC::CondCode Cmp) { in getAdjustedCmp() argument 229 switch (Cmp) { in getAdjustedCmp() 242 MachineInstr *CmpMI, AArch64CC::CondCode Cmp) { in adjustCmp() argument 249 int Correction = (Cmp == AArch64CC::GT) ? 1 : -1; in adjustCmp() 265 return CmpInfo(NewImm, Opc, getAdjustedCmp(Cmp)); in adjustCmp() 273 AArch64CC::CondCode Cmp; in modifyCmp() local 274 std::tie(Imm, Opc, Cmp) = Info; in modifyCmp() 292 .addImm(Cmp) in modifyCmp() [all …]
|
| /freebsd/contrib/llvm-project/llvm/lib/Transforms/Utils/ |
| H A D | LowerAtomic.cpp | 25 Value *Cmp = CXI->getCompareOperand(); in lowerAtomicCmpXchgInst() local 29 buildCmpXchgValue(Builder, Ptr, Cmp, Val, CXI->getAlign()); in lowerAtomicCmpXchgInst() 41 Value *Ptr, Value *Cmp, in buildCmpXchgValue() argument 45 Value *Equal = Builder.CreateICmpEQ(Orig, Cmp); in buildCmpXchgValue() 98 Value *Cmp = Builder.CreateICmpUGE(Loaded, Val); in buildAtomicRMWValue() local 100 return Builder.CreateSelect(Cmp, Zero, Inc, "new"); in buildAtomicRMWValue() 113 Value *Cmp = Builder.CreateICmpUGE(Loaded, Val); in buildAtomicRMWValue() local 115 return Builder.CreateSelect(Cmp, Sub, Loaded, "new"); in buildAtomicRMWValue()
|
| 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 | PredicateInfo.cpp | 372 if (auto *Cmp = dyn_cast<CmpInst>(Cond)) in processAssume() local 373 collectCmpOps(Cmp, Values); in processAssume() 418 if (auto *Cmp = dyn_cast<CmpInst>(Cond)) in processBranch() local 419 collectCmpOps(Cmp, Values); in processBranch() 745 CmpInst *Cmp = dyn_cast<CmpInst>(Condition); in getConstraint() local 746 if (!Cmp) { in getConstraint() 753 if (Cmp->getOperand(0) == RenamedOp) { in getConstraint() 754 Pred = Cmp->getPredicate(); in getConstraint() 755 OtherOp = Cmp->getOperand(1); in getConstraint() 756 } else if (Cmp->getOperand(1) == RenamedOp) { in getConstraint() [all …]
|
| /freebsd/contrib/llvm-project/llvm/utils/TableGen/Common/ |
| H A D | OptEmitter.cpp | 34 if (int Cmp = StrCmpOptionName(A->getValueAsString("Name"), in IsOptionRecordsLess() local 36 return Cmp < 0; in IsOptionRecordsLess() 38 if (int Cmp = StrCmpOptionPrefixes(APrefixes, BPrefixes)) in IsOptionRecordsLess() local 39 return Cmp < 0; in IsOptionRecordsLess()
|
| /freebsd/contrib/llvm-project/llvm/lib/Target/AMDGPU/ |
| H A D | SIOptimizeExecMaskingPreRA.cpp | 156 auto *Cmp = TRI->findReachingDef(CmpReg, CmpSubReg, *And, *MRI, LIS); in optimizeVcndVcmpPair() local 157 if (!Cmp || !(Cmp->getOpcode() == AMDGPU::V_CMP_NE_U32_e32 || in optimizeVcndVcmpPair() 158 Cmp->getOpcode() == AMDGPU::V_CMP_NE_U32_e64) || in optimizeVcndVcmpPair() 159 Cmp->getParent() != And->getParent()) in optimizeVcndVcmpPair() 162 MachineOperand *Op1 = TII->getNamedOperand(*Cmp, AMDGPU::OpName::src0); in optimizeVcndVcmpPair() 163 MachineOperand *Op2 = TII->getNamedOperand(*Cmp, AMDGPU::OpName::src1); in optimizeVcndVcmpPair() 173 auto *Sel = TRI->findReachingDef(SelReg, Op1->getSubReg(), *Cmp, *MRI, LIS); in optimizeVcndVcmpPair() 206 LLVM_DEBUG(dbgs() << "Folding sequence:\n\t" << *Sel << '\t' << *Cmp << '\t' in optimizeVcndVcmpPair() 227 SlotIndex CmpIdx = LIS->getInstructionIndex(*Cmp); in optimizeVcndVcmpPair() 243 std::none_of(std::next(Cmp->getIterator()), Andn2->getIterator(), in optimizeVcndVcmpPair() [all …]
|
| /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 | 473 CmpInst *Cmp, Intrinsic::ID IID); 474 bool optimizeCmp(CmpInst *Cmp, ModifyDT &ModifiedDT); 476 bool combineToUSubWithOverflow(CmpInst *Cmp, ModifyDT &ModifiedDT); 477 bool combineToUAddWithOverflow(CmpInst *Cmp, ModifyDT &ModifiedDT); 478 bool unfoldPowerOf2Test(CmpInst *Cmp); 1554 CmpInst *Cmp, in replaceMathCmpWithIntrinsic() argument 1556 auto IsReplacableIVIncrement = [this, &Cmp](BinaryOperator *BO) { in replaceMathCmpWithIntrinsic() 1562 if (LI->getLoopFor(Cmp->getParent()) != L) in replaceMathCmpWithIntrinsic() 1569 if (DT.dominates(Cmp->getParent(), BO->getParent())) in replaceMathCmpWithIntrinsic() 1575 return BO->hasOneUse() && DT.dominates(Cmp->getParent(), L->getLoopLatch()); in replaceMathCmpWithIntrinsic() [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/Transforms/Scalar/ |
| H A D | CorrelatedValuePropagation.cpp | 286 static bool processICmp(ICmpInst *Cmp, LazyValueInfo *LVI) { in processICmp() argument 288 if (!Cmp->getOperand(0)->getType()->isIntOrIntVectorTy()) in processICmp() 291 if (!Cmp->isSigned() && (!Cmp->isUnsigned() || Cmp->hasSameSign())) in processICmp() 296 ConstantRange CR1 = LVI->getConstantRangeAtUse(Cmp->getOperandUse(0), in processICmp() 298 CR2 = LVI->getConstantRangeAtUse(Cmp->getOperandUse(1), in processICmp() 301 if (Cmp->isSigned()) { in processICmp() 304 Cmp->getPredicate(), CR1, CR2); in processICmp() 310 Cmp->setPredicate(UnsignedPred); in processICmp() 315 Cmp->setSameSign(); in processICmp() 326 static bool constantFoldCmp(CmpInst *Cmp, LazyValueInfo *LVI) { in constantFoldCmp() argument [all …]
|
| H A D | ConstraintElimination.cpp | 1119 if (auto *Cmp = dyn_cast<ICmpInst>(&I)) { in addInfoFor() local 1120 for (Use &U : Cmp->uses()) { in addInfoFor() 1222 if (auto *Cmp = dyn_cast<ICmpInst>(Cur)) { in addInfoFor() local 1225 IsOr ? Cmp->getInverseCmpPredicate() : Cmp->getCmpPredicate(), in addInfoFor() 1226 Cmp->getOperand(0), Cmp->getOperand(1))); in addInfoFor() 1404 auto *Cmp = Builder.CreateICmp(Entry.Pred, Entry.LHS, Entry.RHS); in generateReproducer() local 1405 Builder.CreateAssumption(Cmp); in generateReproducer() 1459 ICmpInst *Cmp, ConstraintInfo &Info, unsigned NumIn, unsigned NumOut, in checkAndReplaceCondition() argument 1463 auto ReplaceCmpWithConstant = [&](CmpInst *Cmp, bool IsTrue) { in checkAndReplaceCondition() argument 1464 generateReproducer(Cmp, ReproducerModule, ReproducerCondStack, Info, DT); in checkAndReplaceCondition() [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->getInverseCmpPredicate()}); 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() 579 [](int i, const BCECmpBlock &Cmp) { in makeName() argument 580 return i + Cmp.BB->getName().size(); in makeName()
|
| /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()
|
| H A D | OptionStrCmp.cpp | 38 if (int Cmp = StrCmpOptionName(APre, BPre)) in StrCmpOptionPrefixes() local 39 return Cmp; in StrCmpOptionPrefixes()
|
| /freebsd/contrib/llvm-project/llvm/include/llvm/IR/ |
| H A D | CmpPredicate.h | 78 LLVM_ABI static CmpPredicate get(const CmpInst *Cmp); 84 LLVM_ABI static CmpPredicate getSwapped(const CmpInst *Cmp);
|
| /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,
|