/freebsd/contrib/llvm-project/llvm/lib/Target/BPF/ |
H A D | BPFCheckAndAdjustIR.cpp | 166 auto *ICmp = new ICmpInst(Opcode, Arg1, Arg2); in removeCompareBuiltin() local 167 ICmp->insertBefore(Call); in removeCompareBuiltin() 169 Call->replaceAllUsesWith(ICmp); in removeCompareBuiltin() 176 ICmpInst *ICmp; member 183 MinMaxSinkInfo(ICmpInst *ICmp, Value *Other, ICmpInst::Predicate Predicate) in MinMaxSinkInfo() 184 : ICmp(ICmp), Other(Other), Predicate(Predicate), MinMax(nullptr), in MinMaxSinkInfo() 256 ICmpInst *ICmp = dyn_cast<ICmpInst>(&I); in sinkMinMaxInBB() local 257 if (!ICmp) in sinkMinMaxInBB() 259 if (!ICmp->isRelational()) in sinkMinMaxInBB() 261 MinMaxSinkInfo First(ICmp, ICmp->getOperand(1), in sinkMinMaxInBB() [all …]
|
/freebsd/contrib/llvm-project/llvm/lib/Transforms/Scalar/ |
H A D | LoopBoundSplit.cpp | 33 ICmpInst *ICmp = nullptr; member 51 static void analyzeICmp(ScalarEvolution &SE, ICmpInst *ICmp, in analyzeICmp() argument 53 Cond.ICmp = ICmp; in analyzeICmp() 54 if (match(ICmp, m_ICmp(Cond.Pred, m_Value(Cond.AddRecValue), in analyzeICmp() 83 const SCEV *ExitCount = SE.getExitCount(&L, Cond.ICmp->getParent()); in calculateUpperBound() 126 ICmpInst *ICmp, ConditionInfo &Cond, in hasProcessableCondition() argument 128 analyzeICmp(SE, ICmp, Cond, L); in hasProcessableCondition() 215 ICmpInst *ICmp = cast<ICmpInst>(ExitingBI->getCondition()); in canSplitLoopBound() local 216 if (!hasProcessableCondition(L, SE, ICmp, Cond, /*IsExitCond*/ true)) in canSplitLoopBound() 264 ICmpInst *ICmp = cast<ICmpInst>(BI->getCondition()); in findSplitCandidate() local [all …]
|
H A D | IndVarSimplify.cpp | 704 ICmpInst *ICmp = dyn_cast<ICmpInst>(BI->getCondition()); in isLoopExitTestBasedOn() local 706 if (!ICmp) in isLoopExitTestBasedOn() 710 return ICmp->getOperand(0) == V || ICmp->getOperand(1) == V; in isLoopExitTestBasedOn() 1265 createReplacement(ICmpInst *ICmp, const Loop *L, BasicBlock *ExitingBB, in createReplacement() argument 1268 ICmpInst::Predicate Pred = ICmp->getPredicate(); in createReplacement() 1269 Value *LHS = ICmp->getOperand(0); in createReplacement() 1270 Value *RHS = ICmp->getOperand(1); in createReplacement() 1363 if (auto *ICmp = dyn_cast<ICmpInst>(Curr)) in optimizeLoopExitWithUnknownExitCount() local 1364 LeafConditions.push_back(ICmp); in optimizeLoopExitWithUnknownExitCount() 1376 for (auto *ICmp : LeafConditions) { in optimizeLoopExitWithUnknownExitCount() local [all …]
|
H A D | LoopDeletion.cpp | 335 auto *ICmp = dyn_cast<ICmpInst>(Cond); in canProveExitOnFirstIteration() local 336 if (!ICmp || !ICmp->getType()->isIntegerTy()) { in canProveExitOnFirstIteration() 342 auto *KnownCondition = getValueOnFirstIteration(ICmp, FirstIterValue, SQ); in canProveExitOnFirstIteration() 343 if (KnownCondition == ICmp) { in canProveExitOnFirstIteration()
|
H A D | LICM.cpp | 2538 Value *InvariantRHS, ICmpInst &ICmp, Loop &L, in hoistAdd() argument 2565 SimplifyQuery(DL, DT, AC, &ICmp)) == in hoistAdd() 2574 ICmp.setPredicate(Pred); in hoistAdd() 2575 ICmp.setOperand(0, VariantOp); in hoistAdd() 2576 ICmp.setOperand(1, NewCmpOp); in hoistAdd() 2585 Value *InvariantRHS, ICmpInst &ICmp, Loop &L, in hoistSub() argument 2616 SimplifyQuery SQ(DL, DT, AC, &ICmp); in hoistSub() 2637 ICmp.setPredicate(Pred); in hoistSub() 2638 ICmp.setOperand(0, VariantOp); in hoistSub() 2639 ICmp.setOperand(1, NewCmpOp); in hoistSub()
|
H A D | SpeculativeExecution.cpp | 246 case Instruction::ICmp: in ComputeSpeculationCost()
|
H A D | CorrelatedValuePropagation.cpp | 334 if (auto *ICmp = dyn_cast<ICmpInst>(Cmp)) in processCmp() local 335 if (processICmp(ICmp, LVI)) in processCmp() 1225 case Instruction::ICmp: in runImpl()
|
/freebsd/contrib/llvm-project/llvm/lib/FuzzMutate/ |
H A D | Operations.cpp | 33 Ops.push_back(cmpOpDescriptor(1, Instruction::ICmp, CmpInst::ICMP_EQ)); in describeFuzzerIntOps() 34 Ops.push_back(cmpOpDescriptor(1, Instruction::ICmp, CmpInst::ICMP_NE)); in describeFuzzerIntOps() 35 Ops.push_back(cmpOpDescriptor(1, Instruction::ICmp, CmpInst::ICMP_UGT)); in describeFuzzerIntOps() 36 Ops.push_back(cmpOpDescriptor(1, Instruction::ICmp, CmpInst::ICMP_UGE)); in describeFuzzerIntOps() 37 Ops.push_back(cmpOpDescriptor(1, Instruction::ICmp, CmpInst::ICMP_ULT)); in describeFuzzerIntOps() 38 Ops.push_back(cmpOpDescriptor(1, Instruction::ICmp, CmpInst::ICMP_ULE)); in describeFuzzerIntOps() 39 Ops.push_back(cmpOpDescriptor(1, Instruction::ICmp, CmpInst::ICMP_SGT)); in describeFuzzerIntOps() 40 Ops.push_back(cmpOpDescriptor(1, Instruction::ICmp, CmpInst::ICMP_SGE)); in describeFuzzerIntOps() 41 Ops.push_back(cmpOpDescriptor(1, Instruction::ICmp, CmpInst::ICMP_SLT)); in describeFuzzerIntOps() 42 Ops.push_back(cmpOpDescriptor(1, Instruction::ICmp, CmpInst::ICMP_SLE)); in describeFuzzerIntOps() [all …]
|
H A D | IRMutator.cpp | 240 case Instruction::ICmp: in mutate() 329 case Instruction::ICmp: in mutate()
|
/freebsd/contrib/llvm-project/llvm/lib/Transforms/Utils/ |
H A D | SimplifyIndVar.cpp | 98 bool makeIVComparisonInvariant(ICmpInst *ICmp, Instruction *IVOperand); 99 void eliminateIVComparison(ICmpInst *ICmp, Instruction *IVOperand); 202 bool SimplifyIndvar::makeIVComparisonInvariant(ICmpInst *ICmp, in makeIVComparisonInvariant() argument 208 ICmpInst::Predicate Pred = ICmp->getPredicate(); in makeIVComparisonInvariant() 209 if (IVOperand != ICmp->getOperand(0)) { in makeIVComparisonInvariant() 211 assert(IVOperand == ICmp->getOperand(1) && "Can't find IVOperand"); in makeIVComparisonInvariant() 218 const Loop *ICmpLoop = LI->getLoopFor(ICmp->getParent()); in makeIVComparisonInvariant() 219 const SCEV *S = SE->getSCEVAtScope(ICmp->getOperand(IVOperIdx), ICmpLoop); in makeIVComparisonInvariant() 220 const SCEV *X = SE->getSCEVAtScope(ICmp->getOperand(1 - IVOperIdx), ICmpLoop); in makeIVComparisonInvariant() 221 auto LIP = SE->getLoopInvariantPredicate(Pred, S, X, L, ICmp); in makeIVComparisonInvariant() [all …]
|
/freebsd/contrib/llvm-project/llvm/lib/CodeGen/ |
H A D | HardwareLoops.cpp | 416 auto ICmp = cast<ICmpInst>(BI->getCondition()); in CanGenerateTest() local 417 LLVM_DEBUG(dbgs() << " - Found condition: " << *ICmp << "\n"); in CanGenerateTest() 418 if (!ICmp->isEquality()) in CanGenerateTest() 421 auto IsCompareZero = [](ICmpInst *ICmp, Value *Count, unsigned OpIdx) { in CanGenerateTest() argument 422 if (auto *Const = dyn_cast<ConstantInt>(ICmp->getOperand(OpIdx))) in CanGenerateTest() 423 return Const->isZero() && ICmp->getOperand(OpIdx ^ 1) == Count; in CanGenerateTest() 431 if (!IsCompareZero(ICmp, Count, 0) && !IsCompareZero(ICmp, Count, 1) && in CanGenerateTest() 432 !IsCompareZero(ICmp, CountBefZext, 0) && in CanGenerateTest() 433 !IsCompareZero(ICmp, CountBefZext, 1)) in CanGenerateTest() 436 unsigned SuccIdx = ICmp->getPredicate() == ICmpInst::ICMP_NE ? 0 : 1; in CanGenerateTest()
|
H A D | TypePromotion.cpp | 268 if (auto *ICmp = dyn_cast<ICmpInst>(V)) in isSink() local 269 return ICmp->isSigned() || LessThanTypeSize(ICmp->getOperand(0)); in isSink() 501 if (I->getOpcode() == Instruction::ICmp) in PromoteTree() 740 case Instruction::ICmp: in isSupportedValue() 985 } else if (auto *ICmp = dyn_cast<ICmpInst>(&I)) { in run() local 988 if (ICmp->isSigned()) in run() 991 LLVM_DEBUG(dbgs() << "IR Promotion: Searching from: " << *ICmp << "\n"); in run() 993 for (auto &Op : ICmp->operands()) { in run()
|
/freebsd/contrib/llvm-project/llvm/lib/Target/AMDGPU/ |
H A D | AMDGPULowerKernelAttributes.cpp | 227 for (User *ICmp : BlockCount->users()) { in processUse() 229 if (match(ICmp, m_ICmp(Pred, GroupIDIntrin, m_Specific(BlockCount)))) { in processUse() 232 ICmp->replaceAllUsesWith(llvm::ConstantInt::getTrue(ICmp->getType())); in processUse()
|
H A D | AMDGPUPromoteAlloca.cpp | 1190 if (ICmpInst *ICmp = dyn_cast<ICmpInst>(UseInst)) { in collectUsesWithPtrTypes() local 1191 if (!binaryOpIsDerivedFromSameAlloca(BaseAlloca, Val, ICmp, 0, 1)) in collectUsesWithPtrTypes() 1195 WorkList.push_back(ICmp); in collectUsesWithPtrTypes()
|
/freebsd/contrib/llvm-project/llvm/lib/Target/WebAssembly/ |
H A D | WebAssemblyFastISel.cpp | 429 if (const auto *ICmp = dyn_cast<ICmpInst>(V)) in getRegForI1Value() local 430 if (const ConstantInt *C = dyn_cast<ConstantInt>(ICmp->getOperand(1))) in getRegForI1Value() 431 if (ICmp->isEquality() && C->isZero() && C->getType()->isIntegerTy(32) && in getRegForI1Value() 432 ICmp->getParent() == BB) { in getRegForI1Value() 433 Not = ICmp->isTrueWhenEqual(); in getRegForI1Value() 434 return getRegForValue(ICmp->getOperand(0)); in getRegForI1Value() 1034 const auto *ICmp = cast<ICmpInst>(I); in selectICmp() local 1036 bool I32 = getSimpleType(ICmp->getOperand(0)->getType()) != MVT::i64; in selectICmp() 1039 switch (ICmp->getPredicate()) { in selectICmp() 1078 unsigned LHS = getRegForPromotedValue(ICmp->getOperand(0), IsSigned); in selectICmp() [all …]
|
/freebsd/contrib/llvm-project/llvm/lib/Transforms/InstCombine/ |
H A D | InstCombineCompares.cpp | 861 auto *ICmp = dyn_cast<ICmpInst>(U->getUser()); in foldAllocaCmp() local 866 if (ICmp && ICmp->isEquality() && getUnderlyingObject(*U) == Alloca) { in foldAllocaCmp() 869 auto Res = ICmps.insert({ICmp, 0}); in foldAllocaCmp() 885 for (auto [ICmp, Operands] : Tracker.ICmps) { in foldAllocaCmp() 892 ICmp->getType(), ICmp->getPredicate() == ICmpInst::ICMP_NE); in foldAllocaCmp() 893 replaceInstUsesWith(*ICmp, Res); in foldAllocaCmp() 894 eraseInstFromFunction(*ICmp); in foldAllocaCmp() 1166 return ICmpInst::Create(Instruction::ICmp, Pred, Masked, Zero); in foldIRemByPowerOfTwoToBitTest() 1195 return ICmpInst::Create(Instruction::ICmp, in foldSignBitTest() 4020 return CmpInst::Create(Instruction::ICmp, ICmpInst::ICMP_EQ, X, in foldICmpIntrinsicWithConstant() [all …]
|
/freebsd/contrib/llvm-project/llvm/lib/Target/SystemZ/ |
H A D | SystemZTDC.cpp | 331 else if (I.getOpcode() == Instruction::ICmp) in runOnFunction() 374 Value *ICmp = IRB.CreateICmp(CmpInst::ICMP_NE, TDC, Zero32); in runOnFunction() local 375 I->replaceAllUsesWith(ICmp); in runOnFunction()
|
H A D | SystemZTargetTransformInfo.cpp | 142 case Instruction::ICmp: in getIntImmCostInst() 972 case Instruction::ICmp: { in getCmpSelInstrCost() 998 if (Opcode == Instruction::ICmp || Opcode == Instruction::FCmp) { in getCmpSelInstrCost() 1106 case Instruction::ICmp: in isFoldableLoad() 1111 if (UserI->getOpcode() != Instruction::ICmp) { in isFoldableLoad() 1139 if (UserI->getOpcode() == Instruction::ICmp) in isFoldableLoad()
|
/freebsd/contrib/llvm-project/llvm/lib/Transforms/Vectorize/ |
H A D | VPlanAnalysis.cpp | 58 case Instruction::ICmp: in inferScalarTypeForRecipe() 92 case Instruction::ICmp: in inferScalarTypeForRecipe() 192 case Instruction::ICmp: in inferScalarTypeForRecipe()
|
H A D | VPlanRecipes.cpp | 138 case Instruction::ICmp: in mayHaveSideEffects() 336 assert(Opcode == Instruction::ICmp && 359 case Instruction::ICmp: in canGenerateScalarForFirstLane() 401 case Instruction::ICmp: { in generatePerPart() 587 if (Op != Instruction::ICmp && Op != Instruction::FCmp) in generatePerPart() 755 case Instruction::ICmp: in onlyFirstLaneUsed() 779 case Instruction::ICmp: in onlyFirstPartUsed() 1102 case Instruction::ICmp: in execute()
|
/freebsd/contrib/llvm-project/llvm/lib/Target/ARM/ |
H A D | MVELaneInterleavingPass.cpp | 240 case Instruction::ICmp: in tryInterleave() 335 I->getOpcode() == Instruction::ICmp; in tryInterleave()
|
/freebsd/contrib/llvm-project/llvm/lib/Transforms/Instrumentation/ |
H A D | ControlHeightReduction.cpp | 1507 static bool negateICmpIfUsedByBranchOrSelectOnly(ICmpInst *ICmp, in negateICmpIfUsedByBranchOrSelectOnly() argument 1510 for (User *U : ICmp->users()) { in negateICmpIfUsedByBranchOrSelectOnly() 1515 if (isa<SelectInst>(U) && cast<SelectInst>(U)->getCondition() == ICmp) in negateICmpIfUsedByBranchOrSelectOnly() 1519 for (User *U : ICmp->users()) { in negateICmpIfUsedByBranchOrSelectOnly() 1549 ICmp->setPredicate(CmpInst::getInversePredicate(ICmp->getPredicate())); in negateICmpIfUsedByBranchOrSelectOnly() 1963 auto *ICmp = dyn_cast<ICmpInst>(Cond); in addToMergedCondition() local 1964 if (!ICmp || in addToMergedCondition() 1965 !negateICmpIfUsedByBranchOrSelectOnly(ICmp, BranchOrSelect, Scope)) in addToMergedCondition()
|
/freebsd/contrib/llvm-project/llvm/lib/Analysis/ |
H A D | IVDescriptors.cpp | 800 case Instruction::ICmp: in isRecurrenceInstr() 1118 return Instruction::ICmp; in getOpcode() 1151 if (RedOp == Instruction::ICmp || RedOp == Instruction::FCmp) in getReductionOpChain() 1159 if (RedOp == Instruction::ICmp || RedOp == Instruction::FCmp) { in getReductionOpChain() 1171 if (RedOp == Instruction::ICmp || RedOp == Instruction::FCmp) { in getReductionOpChain()
|
H A D | CaptureTracking.cpp | 376 case Instruction::ICmp: { in DetermineUseCaptureKind()
|
/freebsd/contrib/llvm-project/llvm/include/llvm/CodeGen/ |
H A D | BasicTTIImpl.h | 1738 thisT()->getCmpSelInstrCost(BinaryOperator::ICmp, RetTy, CondTy, in getIntrinsicInstrCost() 1763 Cost += thisT()->getCmpSelInstrCost(BinaryOperator::ICmp, ExpRetTy, RetTy, in getIntrinsicInstrCost() 2124 Cost += thisT()->getCmpSelInstrCost(BinaryOperator::ICmp, RetTy, CondTy, in getTypeBasedIntrinsicInstrCost() 2143 Cost += thisT()->getCmpSelInstrCost(BinaryOperator::ICmp, RetTy, CondTy, in getTypeBasedIntrinsicInstrCost() 2165 Cost += thisT()->getCmpSelInstrCost(BinaryOperator::ICmp, RetTy, CondTy, in getTypeBasedIntrinsicInstrCost() 2229 Instruction::ICmp, SumTy, OverflowTy, in getTypeBasedIntrinsicInstrCost() 2249 thisT()->getCmpSelInstrCost(BinaryOperator::ICmp, SumTy, OverflowTy, in getTypeBasedIntrinsicInstrCost() 2282 BinaryOperator::ICmp, MulTy, OverflowTy, CmpInst::ICMP_NE, CostKind); in getTypeBasedIntrinsicInstrCost() 2481 thisT()->getCmpSelInstrCost(Instruction::ICmp, ValTy, in getTreeReductionCost()
|