Home
last modified time | relevance | path

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

12345

/llvm-project-15.0.7/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()
215 ICmpInst *ICmp = cast<ICmpInst>(ExitingBI->getCondition()); in canSplitLoopBound() local
264 ICmpInst *ICmp = cast<ICmpInst>(BI->getCondition()); in findSplitCandidate() local
265 if (!hasProcessableCondition(L, SE, ICmp, SplitCandidateCond, in findSplitCandidate()
[all …]
H A DIndVarSimplify.cpp707 if (!ICmp) in isLoopExitTestBasedOn()
711 return ICmp->getOperand(0) == V || ICmp->getOperand(1) == V; in isLoopExitTestBasedOn()
1449 if (!ICmp || !ICmp->hasOneUse()) in canonicalizeExitCondition()
1452 auto *LHS = ICmp->getOperand(0); in canonicalizeExitCondition()
1453 auto *RHS = ICmp->getOperand(1); in canonicalizeExitCondition()
1478 ICmp->setPredicate(ICmp->getUnsignedPredicate()); in canonicalizeExitCondition()
1495 if (!ICmp || !ICmp->hasOneUse() || !ICmp->isUnsigned()) in canonicalizeExitCondition()
1499 auto *LHS = ICmp->getOperand(0); in canonicalizeExitCondition()
1500 auto *RHS = ICmp->getOperand(1); in canonicalizeExitCondition()
1537 ICmp->setOperand(Swapped ? 1 : 0, LHSOp); in canonicalizeExitCondition()
[all …]
H A DLoopDeletion.cpp338 auto *ICmp = dyn_cast<ICmpInst>(Cond); in canProveExitOnFirstIteration() local
339 if (!ICmp || !ICmp->getType()->isIntegerTy()) { in canProveExitOnFirstIteration()
345 auto *KnownCondition = getValueOnFirstIteration(ICmp, FirstIterValue, SQ); in canProveExitOnFirstIteration()
346 if (KnownCondition == ICmp) { in canProveExitOnFirstIteration()
H A DSpeculativeExecution.cpp246 case Instruction::ICmp: in ComputeSpeculationCost()
/llvm-project-15.0.7/llvm/lib/Transforms/Utils/
H A DSimplifyIndVar.cpp200 if (IVOperand != ICmp->getOperand(0)) { in makeIVComparisonInvariant()
258 ICmp->setPredicate(InvariantPredicate); in makeIVComparisonInvariant()
259 ICmp->setOperand(0, NewLHS); in makeIVComparisonInvariant()
260 ICmp->setOperand(1, NewRHS); in makeIVComparisonInvariant()
271 if (IVOperand != ICmp->getOperand(0)) { in eliminateIVComparison()
287 for (auto *U : ICmp->users()) in eliminateIVComparison()
291 ICmp->replaceAllUsesWith(ConstantInt::getBool(ICmp->getContext(), *Ev)); in eliminateIVComparison()
292 DeadInsts.emplace_back(ICmp); in eliminateIVComparison()
607 eliminateIVComparison(ICmp, IVOperand); in eliminateIVUser()
1572 auto Pred = ICmp->getPredicate(); in widenWithVariantUse()
[all …]
/llvm-project-15.0.7/llvm/lib/CodeGen/
H A DHardwareLoops.cpp354 auto ICmp = cast<ICmpInst>(BI->getCondition()); in CanGenerateTest() local
355 LLVM_DEBUG(dbgs() << " - Found condition: " << *ICmp << "\n"); in CanGenerateTest()
356 if (!ICmp->isEquality()) in CanGenerateTest()
359 auto IsCompareZero = [](ICmpInst *ICmp, Value *Count, unsigned OpIdx) { in CanGenerateTest() argument
360 if (auto *Const = dyn_cast<ConstantInt>(ICmp->getOperand(OpIdx))) in CanGenerateTest()
361 return Const->isZero() && ICmp->getOperand(OpIdx ^ 1) == Count; in CanGenerateTest()
369 if (!IsCompareZero(ICmp, Count, 0) && !IsCompareZero(ICmp, Count, 1) && in CanGenerateTest()
370 !IsCompareZero(ICmp, CountBefZext, 0) && in CanGenerateTest()
371 !IsCompareZero(ICmp, CountBefZext, 1)) in CanGenerateTest()
374 unsigned SuccIdx = ICmp->getPredicate() == ICmpInst::ICMP_NE ? 0 : 1; in CanGenerateTest()
H A DTypePromotion.cpp258 if (auto *ICmp = dyn_cast<ICmpInst>(V)) in isSink() local
259 return ICmp->isSigned() || LessThanTypeSize(ICmp->getOperand(0)); in isSink()
487 (I->getOpcode() == Instruction::ICmp || i == 1) && in PromoteTree()
716 case Instruction::ICmp: in isSupportedValue()
914 auto *ICmp = cast<ICmpInst>(&I); in runOnFunction() local
916 if (ICmp->isSigned() || !isa<IntegerType>(ICmp->getOperand(0)->getType())) in runOnFunction()
919 LLVM_DEBUG(dbgs() << "IR Promotion: Searching from: " << *ICmp << "\n"); in runOnFunction()
921 for (auto &Op : ICmp->operands()) { in runOnFunction()
H A DExpandReductions.cpp49 return Instruction::ICmp; in getOpcode()
/llvm-project-15.0.7/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 …]
/llvm-project-15.0.7/llvm/unittests/Transforms/Vectorize/
H A DVPlanHCFGTest.cpp89 VPInstruction *ICmp = dyn_cast<VPInstruction>(&*Iter++); in TEST_F() local
90 EXPECT_EQ(Instruction::ICmp, ICmp->getOpcode()); in TEST_F()
91 EXPECT_EQ(2u, ICmp->getNumOperands()); in TEST_F()
92 EXPECT_EQ(IndvarAdd, ICmp->getOperand(0)); in TEST_F()
/llvm-project-15.0.7/llvm/unittests/Analysis/
H A DCaptureTrackingTest.cpp108 Instruction *ICmp = CmpXChg->getNextNode(); in TEST() local
129 EXPECT_EQ(ICmp, CT.Captures[5]->getUser()); in TEST()
132 EXPECT_EQ(ICmp, CT.Captures[6]->getUser()); in TEST()
/llvm-project-15.0.7/llvm/lib/Target/BPF/
H A DBPFCheckAndAdjustIR.cpp155 auto *ICmp = new ICmpInst(Opcode, Arg1, Arg2); in removeCompareBuiltin() local
156 BB.getInstList().insert(Call->getIterator(), ICmp); in removeCompareBuiltin()
158 Call->replaceAllUsesWith(ICmp); in removeCompareBuiltin()
/llvm-project-15.0.7/llvm/lib/Target/WebAssembly/
H A DWebAssemblyFastISel.cpp425 if (const auto *ICmp = dyn_cast<ICmpInst>(V)) in getRegForI1Value() local
428 ICmp->getParent() == BB) { in getRegForI1Value()
429 Not = ICmp->isTrueWhenEqual(); in getRegForI1Value()
430 return getRegForValue(ICmp->getOperand(0)); in getRegForI1Value()
1027 const auto *ICmp = cast<ICmpInst>(I); in selectICmp() local
1029 bool I32 = getSimpleType(ICmp->getOperand(0)->getType()) != MVT::i64; in selectICmp()
1032 switch (ICmp->getPredicate()) { in selectICmp()
1071 unsigned LHS = getRegForPromotedValue(ICmp->getOperand(0), IsSigned); in selectICmp()
1075 unsigned RHS = getRegForPromotedValue(ICmp->getOperand(1), IsSigned); in selectICmp()
1083 updateValueMap(ICmp, ResultReg); in selectICmp()
[all …]
/llvm-project-15.0.7/llvm/unittests/Transforms/Utils/
H A DIntegerDivisionTest.cpp76 EXPECT_TRUE(BB->front().getOpcode() == Instruction::ICmp); in TEST()
136 EXPECT_TRUE(BB->front().getOpcode() == Instruction::ICmp); in TEST()
197 EXPECT_TRUE(BB->front().getOpcode() == Instruction::ICmp); in TEST()
257 EXPECT_TRUE(BB->front().getOpcode() == Instruction::ICmp); in TEST()
/llvm-project-15.0.7/llvm/lib/Target/SystemZ/
H A DSystemZTDC.cpp331 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 DSystemZTargetTransformInfo.cpp137 case Instruction::ICmp: in getIntImmCostInst()
924 case Instruction::ICmp: { in getCmpSelInstrCost()
950 if (Opcode == Instruction::ICmp || Opcode == Instruction::FCmp) { in getCmpSelInstrCost()
1056 case Instruction::ICmp: in isFoldableLoad()
1061 if (UserI->getOpcode() != Instruction::ICmp) { in isFoldableLoad()
1089 if (UserI->getOpcode() == Instruction::ICmp) in isFoldableLoad()
/llvm-project-15.0.7/llvm/lib/Transforms/InstCombine/
H A DInstCombineCompares.cpp1369 return ICmpInst::Create(Instruction::ICmp, in foldSignBitTest()
4747 return ICmp; in foldICmpEquality()
4795 Value *Op0 = ICmp.getOperand(0), *Op1 = ICmp.getOperand(1); in foldICmpWithTrunc()
4842 bool IsSignedCmp = ICmp.isSigned(); in foldICmpWithZextOrSext()
4865 if (!ICmp.getOperand(0)->hasOneUse() && !ICmp.getOperand(1)->hasOneUse()) in foldICmpWithZextOrSext()
4880 if (ICmp.isEquality()) in foldICmpWithZextOrSext()
4906 if (ICmp.isEquality()) in foldICmpWithZextOrSext()
4928 if (ICmp.getPredicate() == ICmpInst::ICMP_ULT) in foldICmpWithZextOrSext()
4945 return new ICmpInst(ICmp.getPredicate(), in foldICmpWithCastOp()
4952 if (!isa<Constant>(ICmp.getOperand(1)) && !isa<CastInst>(ICmp.getOperand(1))) in foldICmpWithCastOp()
[all …]
/llvm-project-15.0.7/polly/lib/Analysis/
H A DScopDetection.cpp612 ICmpInst *ICmp = cast<ICmpInst>(Condition); in isValidBranch() local
615 if (isa<UndefValue>(ICmp->getOperand(0)) || in isValidBranch()
616 isa<UndefValue>(ICmp->getOperand(1))) in isValidBranch()
617 return invalid<ReportUndefOperand>(Context, /*Assert=*/true, &BB, ICmp); in isValidBranch()
620 const SCEV *LHS = SE.getSCEVAtScope(ICmp->getOperand(0), L); in isValidBranch()
621 const SCEV *RHS = SE.getSCEVAtScope(ICmp->getOperand(1), L); in isValidBranch()
627 if (ICmp->isUnsigned() && !PollyAllowUnsignedOperations) in isValidBranch()
632 if (ICmp->isEquality() && involvesMultiplePtrs(LHS, nullptr, L) && in isValidBranch()
637 if (ICmp->isRelational() && involvesMultiplePtrs(LHS, RHS, L)) in isValidBranch()
651 ICmp); in isValidBranch()
/llvm-project-15.0.7/llvm/lib/Transforms/Instrumentation/
H A DControlHeightReduction.cpp1498 static bool negateICmpIfUsedByBranchOrSelectOnly(ICmpInst *ICmp, in negateICmpIfUsedByBranchOrSelectOnly() argument
1501 for (User *U : ICmp->users()) { in negateICmpIfUsedByBranchOrSelectOnly()
1506 if (isa<SelectInst>(U) && cast<SelectInst>(U)->getCondition() == ICmp) in negateICmpIfUsedByBranchOrSelectOnly()
1510 for (User *U : ICmp->users()) { in negateICmpIfUsedByBranchOrSelectOnly()
1540 ICmp->setPredicate(CmpInst::getInversePredicate(ICmp->getPredicate())); in negateICmpIfUsedByBranchOrSelectOnly()
1930 auto *ICmp = dyn_cast<ICmpInst>(Cond); in addToMergedCondition() local
1931 if (!ICmp || in addToMergedCondition()
1932 !negateICmpIfUsedByBranchOrSelectOnly(ICmp, BranchOrSelect, Scope)) in addToMergedCondition()
/llvm-project-15.0.7/llvm/include/llvm/CodeGen/
H A DBasicTTIImpl.h1561 thisT()->getCmpSelInstrCost(BinaryOperator::ICmp, RetTy, CondTy, in getIntrinsicInstrCost()
1588 Cost += thisT()->getCmpSelInstrCost(BinaryOperator::ICmp, ExpRetTy, RetTy, in getIntrinsicInstrCost()
1819 Cost += thisT()->getCmpSelInstrCost(BinaryOperator::ICmp, RetTy, CondTy, in getTypeBasedIntrinsicInstrCost()
1838 Cost += thisT()->getCmpSelInstrCost(BinaryOperator::ICmp, RetTy, CondTy, in getTypeBasedIntrinsicInstrCost()
1860 Cost += thisT()->getCmpSelInstrCost(BinaryOperator::ICmp, RetTy, CondTy, in getTypeBasedIntrinsicInstrCost()
1923 Instruction::ICmp, SumTy, OverflowTy, in getTypeBasedIntrinsicInstrCost()
1943 thisT()->getCmpSelInstrCost(BinaryOperator::ICmp, SumTy, OverflowTy, in getTypeBasedIntrinsicInstrCost()
1974 BinaryOperator::ICmp, MulTy, OverflowTy, CmpInst::ICMP_NE, CostKind); in getTypeBasedIntrinsicInstrCost()
2173 thisT()->getCmpSelInstrCost(Instruction::ICmp, ValTy, in getTreeReductionCost()
2272 CmpOpcode = Instruction::ICmp; in getMinMaxReductionCost()
/llvm-project-15.0.7/llvm/lib/Analysis/
H A DIVDescriptors.cpp794 case Instruction::ICmp: in isRecurrenceInstr()
1124 return Instruction::ICmp; in getOpcode()
1155 if (RedOp == Instruction::ICmp || RedOp == Instruction::FCmp) in getReductionOpChain()
1163 if (RedOp == Instruction::ICmp || RedOp == Instruction::FCmp) { in getReductionOpChain()
1175 if (RedOp == Instruction::ICmp || RedOp == Instruction::FCmp) { in getReductionOpChain()
H A DCFLGraph.h185 return CE->getOpcode() != Instruction::ICmp && in hasUsefulEdges()
587 case Instruction::ICmp: in visitConstantExpr()
/llvm-project-15.0.7/polly/lib/Support/
H A DSCEVValidator.cpp636 if (auto *ICmp = dyn_cast<ICmpInst>(V)) { in isAffineConstraint() local
637 return isAffineConstraint(ICmp->getOperand(0), R, Scope, SE, Params, in isAffineConstraint()
639 isAffineConstraint(ICmp->getOperand(1), R, Scope, SE, Params, true); in isAffineConstraint()
/llvm-project-15.0.7/llvm/lib/IR/
H A DConstantsContext.h266 return CE->getOpcode() == Instruction::ICmp || in classof()
541 case Instruction::ICmp:
542 return new CompareConstantExpr(Ty, Instruction::ICmp, SubclassData,
/llvm-project-15.0.7/llvm/unittests/FuzzMutate/
H A DStrategiesTest.cpp194 TEST(InstModificationIRStrategyTest, ICmp) { in TEST() argument

12345