Home
last modified time | relevance | path

Searched refs:ICmp (Results 1 – 25 of 99) sorted by relevance

1234

/freebsd/contrib/llvm-project/llvm/lib/Target/BPF/
H A DBPFCheckAndAdjustIR.cpp163 auto *ICmp = new ICmpInst(Opcode, Arg1, Arg2); in removeCompareBuiltin() local
164 ICmp->insertBefore(Call->getIterator()); in removeCompareBuiltin()
166 Call->replaceAllUsesWith(ICmp); in removeCompareBuiltin()
173 ICmpInst *ICmp; member
180 MinMaxSinkInfo(ICmpInst *ICmp, Value *Other, ICmpInst::Predicate Predicate) in MinMaxSinkInfo()
181 : ICmp(ICmp), Other(Other), Predicate(Predicate), MinMax(nullptr), in MinMaxSinkInfo()
253 ICmpInst *ICmp = dyn_cast<ICmpInst>(&I); in sinkMinMaxInBB() local
254 if (!ICmp) in sinkMinMaxInBB()
256 if (!ICmp->isRelational()) in sinkMinMaxInBB()
258 MinMaxSinkInfo First(ICmp, ICmp->getOperand(1), in sinkMinMaxInBB()
[all …]
/freebsd/contrib/llvm-project/llvm/lib/Transforms/Scalar/
H A DLoopBoundSplit.cpp33 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()
214 ICmpInst *ICmp = cast<ICmpInst>(ExitingBI->getCondition()); in canSplitLoopBound() local
215 if (!hasProcessableCondition(L, SE, ICmp, Cond, /*IsExitCond*/ true)) in canSplitLoopBound()
263 ICmpInst *ICmp = cast<ICmpInst>(BI->getCondition()); in findSplitCandidate() local
[all …]
H A DIndVarSimplify.cpp699 ICmpInst *ICmp = dyn_cast<ICmpInst>(BI->getCondition()); in isLoopExitTestBasedOn() local
701 if (!ICmp) in isLoopExitTestBasedOn()
705 return ICmp->getOperand(0) == V || ICmp->getOperand(1) == V; in isLoopExitTestBasedOn()
1241 createReplacement(ICmpInst *ICmp, const Loop *L, BasicBlock *ExitingBB, in createReplacement() argument
1244 CmpPredicate Pred = ICmp->getCmpPredicate(); in createReplacement()
1245 Value *LHS = ICmp->getOperand(0); in createReplacement()
1246 Value *RHS = ICmp->getOperand(1); in createReplacement()
1339 if (auto *ICmp = dyn_cast<ICmpInst>(Curr)) in optimizeLoopExitWithUnknownExitCount() local
1340 LeafConditions.push_back(ICmp); in optimizeLoopExitWithUnknownExitCount()
1352 for (auto *ICmp : LeafConditions) { in optimizeLoopExitWithUnknownExitCount() local
[all …]
H A DLoopDeletion.cpp335 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 DLICM.cpp2557 Value *InvariantRHS, ICmpInst &ICmp, Loop &L, in hoistAdd() argument
2587 SimplifyQuery SQ(DL, DT, AC, &ICmp); in hoistAdd()
2601 ICmp.setPredicate(Pred); in hoistAdd()
2602 ICmp.setOperand(0, VariantOp); in hoistAdd()
2603 ICmp.setOperand(1, NewCmpOp); in hoistAdd()
2615 Value *InvariantRHS, ICmpInst &ICmp, Loop &L, in hoistSub() argument
2651 SimplifyQuery SQ(DL, DT, AC, &ICmp); in hoistSub()
2682 ICmp.setPredicate(Pred); in hoistSub()
2683 ICmp.setOperand(0, VariantOp); in hoistSub()
2684 ICmp.setOperand(1, NewCmpOp); in hoistSub()
H A DSpeculativeExecution.cpp246 case Instruction::ICmp: in ComputeSpeculationCost()
/freebsd/contrib/llvm-project/llvm/lib/Transforms/Utils/
H A DSimplifyIndVar.cpp98 bool makeIVComparisonInvariant(ICmpInst *ICmp, Instruction *IVOperand);
99 void eliminateIVComparison(ICmpInst *ICmp, Instruction *IVOperand);
202 bool SimplifyIndvar::makeIVComparisonInvariant(ICmpInst *ICmp, in makeIVComparisonInvariant() argument
208 CmpPredicate Pred = ICmp->getCmpPredicate(); 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 …]
H A DScalarEvolutionExpander.cpp70 if (auto *ICmp = dyn_cast<ICmpInst>(I)) in PoisonFlags() local
71 SameSign = ICmp->hasSameSign(); in PoisonFlags()
91 if (auto *ICmp = dyn_cast<ICmpInst>(I)) in apply() local
92 ICmp->setSameSign(SameSign); in apply()
1402 Value *ICmp = in expandMinMaxExpr() local
1404 Sel = Builder.CreateSelect(ICmp, LHS, RHS, Name); in expandMinMaxExpr()
1921 Cost += CmpSelCost(Instruction::ICmp, S->getNumOperands() - 1, 0, 1); in costAndCollectOperands()
1927 Cost += CmpSelCost(Instruction::ICmp, S->getNumOperands() - 1, 0, 0); in costAndCollectOperands()
/freebsd/contrib/llvm-project/llvm/lib/FuzzMutate/
H A DOperations.cpp33 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 …]
/freebsd/contrib/llvm-project/llvm/lib/CodeGen/
H A DHardwareLoops.cpp415 auto ICmp = cast<ICmpInst>(BI->getCondition()); in CanGenerateTest() local
416 LLVM_DEBUG(dbgs() << " - Found condition: " << *ICmp << "\n"); in CanGenerateTest()
417 if (!ICmp->isEquality()) in CanGenerateTest()
420 auto IsCompareZero = [](ICmpInst *ICmp, Value *Count, unsigned OpIdx) { in CanGenerateTest() argument
421 if (auto *Const = dyn_cast<ConstantInt>(ICmp->getOperand(OpIdx))) in CanGenerateTest()
422 return Const->isZero() && ICmp->getOperand(OpIdx ^ 1) == Count; in CanGenerateTest()
430 if (!IsCompareZero(ICmp, Count, 0) && !IsCompareZero(ICmp, Count, 1) && in CanGenerateTest()
431 !IsCompareZero(ICmp, CountBefZext, 0) && in CanGenerateTest()
432 !IsCompareZero(ICmp, CountBefZext, 1)) in CanGenerateTest()
435 unsigned SuccIdx = ICmp->getPredicate() == ICmpInst::ICMP_NE ? 0 : 1; in CanGenerateTest()
H A DTypePromotion.cpp268 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()
984 } else if (auto *ICmp = dyn_cast<ICmpInst>(&I)) { in run() local
987 if (ICmp->isSigned()) in run()
990 LLVM_DEBUG(dbgs() << "IR Promotion: Searching from: " << *ICmp << "\n"); in run()
992 for (auto &Op : ICmp->operands()) { in run()
/freebsd/contrib/llvm-project/llvm/lib/Analysis/
H A DCmpInstAnalysis.cpp192 if (auto *ICmp = dyn_cast<ICmpInst>(Cond)) { in decomposeBitTest() local
194 if (!ICmp->getOperand(0)->getType()->isIntOrIntVectorTy()) in decomposeBitTest()
196 return decomposeBitTestICmp(ICmp->getOperand(0), ICmp->getOperand(1), in decomposeBitTest()
197 ICmp->getPredicate(), LookThruTrunc, in decomposeBitTest()
/freebsd/contrib/llvm-project/llvm/lib/CodeGen/GlobalISel/
H A DCombinerHelperCompares.cpp29 bool CombinerHelper::constantFoldICmp(const GICmp &ICmp, in constantFoldICmp() argument
36 Register Dst = ICmp.getReg(0); in constantFoldICmp()
42 CmpInst::Predicate Pred = ICmp.getCond(); in constantFoldICmp()
/freebsd/contrib/llvm-project/llvm/lib/Target/AMDGPU/
H A DAMDGPULowerKernelAttributes.cpp251 for (User *ICmp : BlockCount->users()) { in processUse()
252 if (match(ICmp, m_SpecificICmp(ICmpInst::ICMP_ULT, GroupIDIntrin, in processUse()
254 ICmp->replaceAllUsesWith(llvm::ConstantInt::getTrue(ICmp->getType())); in processUse()
/freebsd/contrib/llvm-project/llvm/lib/Target/WebAssembly/
H A DWebAssemblyFastISel.cpp435 if (const auto *ICmp = dyn_cast<ICmpInst>(V)) in getRegForI1Value() local
436 if (const ConstantInt *C = dyn_cast<ConstantInt>(ICmp->getOperand(1))) in getRegForI1Value()
437 if (ICmp->isEquality() && C->isZero() && C->getType()->isIntegerTy(32) && in getRegForI1Value()
438 ICmp->getParent() == BB) { in getRegForI1Value()
439 Not = ICmp->isTrueWhenEqual(); in getRegForI1Value()
440 return getRegForValue(ICmp->getOperand(0)); in getRegForI1Value()
1043 const auto *ICmp = cast<ICmpInst>(I); in selectICmp() local
1045 bool I32 = getSimpleType(ICmp->getOperand(0)->getType()) != MVT::i64; in selectICmp()
1048 switch (ICmp->getPredicate()) { in selectICmp()
1087 unsigned LHS = getRegForPromotedValue(ICmp->getOperand(0), IsSigned); in selectICmp()
[all …]
/freebsd/contrib/llvm-project/llvm/lib/Transforms/InstCombine/
H A DInstCombineCompares.cpp890 auto *ICmp = dyn_cast<ICmpInst>(U->getUser()); in foldAllocaCmp() local
895 if (ICmp && ICmp->isEquality() && getUnderlyingObject(*U) == Alloca) { in foldAllocaCmp()
898 ICmps[ICmp] |= 1u << U->getOperandNo(); in foldAllocaCmp()
913 for (auto [ICmp, Operands] : Tracker.ICmps) { in foldAllocaCmp()
919 auto *Res = ConstantInt::get(ICmp->getType(), in foldAllocaCmp()
920 ICmp->getPredicate() == ICmpInst::ICMP_NE); in foldAllocaCmp()
921 replaceInstUsesWith(*ICmp, Res); in foldAllocaCmp()
922 eraseInstFromFunction(*ICmp); in foldAllocaCmp()
1194 return ICmpInst::Create(Instruction::ICmp, Pred, Masked, Zero); in foldIRemByPowerOfTwoToBitTest()
1223 return ICmpInst::Create(Instruction::ICmp, in foldSignBitTest()
[all …]
/freebsd/contrib/llvm-project/llvm/lib/Target/SystemZ/
H A DSystemZTDC.cpp327 else if (I.getOpcode() == Instruction::ICmp) in runOnFunction()
369 Value *ICmp = IRB.CreateICmp(CmpInst::ICMP_NE, TDC, Zero32); in runOnFunction() local
370 I->replaceAllUsesWith(ICmp); in runOnFunction()
H A DSystemZTargetTransformInfo.cpp221 case Instruction::ICmp: in getIntImmCostInst()
1099 case Instruction::ICmp: { in getCmpSelInstrCost()
1134 if (Opcode == Instruction::ICmp || Opcode == Instruction::FCmp) { in getCmpSelInstrCost()
1251 case Instruction::ICmp: in isFoldableLoad()
1256 if (UserI->getOpcode() != Instruction::ICmp) { in isFoldableLoad()
1284 if (UserI->getOpcode() == Instruction::ICmp) in isFoldableLoad()
/freebsd/contrib/llvm-project/llvm/include/llvm/SandboxIR/
H A DValues.def132 DEF_INSTR(ICmp, OP(ICmp), FCmpInst)
/freebsd/contrib/llvm-project/llvm/lib/Target/ARM/
H A DMVELaneInterleavingPass.cpp234 case Instruction::ICmp: in tryInterleave()
329 I->getOpcode() == Instruction::ICmp; in tryInterleave()
/freebsd/contrib/llvm-project/llvm/lib/Transforms/Vectorize/
H A DVPlanAnalysis.cpp86 case Instruction::ICmp: in inferScalarTypeForRecipe()
157 case Instruction::ICmp: in inferScalarTypeForRecipe()
229 case Instruction::ICmp: in inferScalarTypeForRecipe()
H A DVPlanUtils.cpp71 return match(V, m_Binary<Instruction::ICmp>(m_VPValue(A), m_VPValue(B))) && in isHeaderMask()
H A DVPlanUtils.h48 case Instruction::ICmp: in isSingleScalar()
/freebsd/contrib/llvm-project/llvm/lib/Transforms/Instrumentation/
H A DControlHeightReduction.cpp1497 static bool negateICmpIfUsedByBranchOrSelectOnly(ICmpInst *ICmp, in negateICmpIfUsedByBranchOrSelectOnly() argument
1500 for (User *U : ICmp->users()) { in negateICmpIfUsedByBranchOrSelectOnly()
1505 if (isa<SelectInst>(U) && cast<SelectInst>(U)->getCondition() == ICmp) in negateICmpIfUsedByBranchOrSelectOnly()
1509 for (User *U : ICmp->users()) { in negateICmpIfUsedByBranchOrSelectOnly()
1539 ICmp->setPredicate(CmpInst::getInversePredicate(ICmp->getPredicate())); in negateICmpIfUsedByBranchOrSelectOnly()
1954 auto *ICmp = dyn_cast<ICmpInst>(Cond); in addToMergedCondition() local
1955 if (!ICmp || in addToMergedCondition()
1956 !negateICmpIfUsedByBranchOrSelectOnly(ICmp, BranchOrSelect, Scope)) in addToMergedCondition()
/freebsd/contrib/llvm-project/llvm/include/llvm/CodeGen/
H A DBasicTTIImpl.h2057 thisT()->getCmpSelInstrCost(BinaryOperator::ICmp, RetTy, CondTy, in getIntrinsicInstrCost()
2453 Cost += thisT()->getCmpSelInstrCost(BinaryOperator::ICmp, SearchTy, RetTy, in getTypeBasedIntrinsicInstrCost()
2479 Cost += thisT()->getCmpSelInstrCost(BinaryOperator::ICmp, ExpRetTy, RetTy, in getTypeBasedIntrinsicInstrCost()
2638 Cost += thisT()->getCmpSelInstrCost(BinaryOperator::ICmp, RetTy, CondTy, in getTypeBasedIntrinsicInstrCost()
2659 2 * thisT()->getCmpSelInstrCost(Instruction::ICmp, SumTy, OverflowTy, in getTypeBasedIntrinsicInstrCost()
2678 Cost += thisT()->getCmpSelInstrCost(BinaryOperator::ICmp, SumTy, in getTypeBasedIntrinsicInstrCost()
2710 BinaryOperator::ICmp, MulTy, OverflowTy, CmpInst::ICMP_NE, CostKind); in getTypeBasedIntrinsicInstrCost()
2730 Cost += thisT()->getCmpSelInstrCost(BinaryOperator::ICmp, RetTy, CondTy, in getTypeBasedIntrinsicInstrCost()
2783 Cost += thisT()->getCmpSelInstrCost(BinaryOperator::ICmp, RetTy, CondTy, in getTypeBasedIntrinsicInstrCost()
2816 Cost += thisT()->getCmpSelInstrCost(BinaryOperator::ICmp, RetTy, CondTy, in getTypeBasedIntrinsicInstrCost()
[all …]

1234