Home
last modified time | relevance | path

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

1234

/netbsd-src/external/apache2/llvm/dist/llvm/lib/Transforms/Utils/
H A DSimplifyIndVar.cpp89 bool makeIVComparisonInvariant(ICmpInst *ICmp, Value *IVOperand);
90 void eliminateIVComparison(ICmpInst *ICmp, Value *IVOperand);
195 bool SimplifyIndvar::makeIVComparisonInvariant(ICmpInst *ICmp, in makeIVComparisonInvariant() argument
198 ICmpInst::Predicate Pred = ICmp->getPredicate(); in makeIVComparisonInvariant()
199 if (IVOperand != ICmp->getOperand(0)) { in makeIVComparisonInvariant()
201 assert(IVOperand == ICmp->getOperand(1) && "Can't find IVOperand"); in makeIVComparisonInvariant()
208 const Loop *ICmpLoop = LI->getLoopFor(ICmp->getParent()); in makeIVComparisonInvariant()
209 const SCEV *S = SE->getSCEVAtScope(ICmp->getOperand(IVOperIdx), ICmpLoop); in makeIVComparisonInvariant()
210 const SCEV *X = SE->getSCEVAtScope(ICmp->getOperand(1 - IVOperIdx), ICmpLoop); in makeIVComparisonInvariant()
227 CheapExpansions[S] = ICmp->getOperand(IVOperIdx); in makeIVComparisonInvariant()
[all …]
H A DScalarEvolutionExpander.cpp1741 Value *ICmp = Builder.CreateICmpSGT(LHS, RHS); in visitSMaxExpr() local
1742 Sel = Builder.CreateSelect(ICmp, LHS, RHS, "smax"); in visitSMaxExpr()
1770 Value *ICmp = Builder.CreateICmpUGT(LHS, RHS); in visitUMaxExpr() local
1771 Sel = Builder.CreateSelect(ICmp, LHS, RHS, "umax"); in visitUMaxExpr()
1799 Value *ICmp = Builder.CreateICmpSLT(LHS, RHS); in visitSMinExpr() local
1800 Sel = Builder.CreateSelect(ICmp, LHS, RHS, "smin"); in visitSMinExpr()
1828 Value *ICmp = Builder.CreateICmpULT(LHS, RHS); in visitUMinExpr() local
1829 Sel = Builder.CreateSelect(ICmp, LHS, RHS, "umin"); in visitUMinExpr()
2308 Cost += CmpSelCost(Instruction::ICmp, S->getNumOperands() - 1, 0, 1); in costAndCollectOperands()
/netbsd-src/external/apache2/llvm/dist/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 …]
H A DIRMutator.cpp219 case Instruction::ICmp: in mutate()
/netbsd-src/external/apache2/llvm/dist/llvm/lib/CodeGen/
H A DHardwareLoops.cpp357 auto ICmp = cast<ICmpInst>(BI->getCondition()); in CanGenerateTest() local
358 LLVM_DEBUG(dbgs() << " - Found condition: " << *ICmp << "\n"); in CanGenerateTest()
359 if (!ICmp->isEquality()) in CanGenerateTest()
362 auto IsCompareZero = [](ICmpInst *ICmp, Value *Count, unsigned OpIdx) { in CanGenerateTest() argument
363 if (auto *Const = dyn_cast<ConstantInt>(ICmp->getOperand(OpIdx))) in CanGenerateTest()
364 return Const->isZero() && ICmp->getOperand(OpIdx ^ 1) == Count; in CanGenerateTest()
368 if (!IsCompareZero(ICmp, Count, 0) && !IsCompareZero(ICmp, Count, 1)) in CanGenerateTest()
371 unsigned SuccIdx = ICmp->getPredicate() == ICmpInst::ICMP_NE ? 0 : 1; in CanGenerateTest()
H A DTypePromotion.cpp270 if (auto *ICmp = dyn_cast<ICmpInst>(V)) in isSink() local
271 return ICmp->isSigned() || LessThanTypeSize(ICmp->getOperand(0)); in isSink()
767 case Instruction::ICmp: in isSupportedValue()
968 auto *ICmp = cast<ICmpInst>(&I); in runOnFunction() local
970 if (ICmp->isSigned() || in runOnFunction()
971 !isa<IntegerType>(ICmp->getOperand(0)->getType())) in runOnFunction()
974 LLVM_DEBUG(dbgs() << "IR Promotion: Searching from: " << *ICmp << "\n"); in runOnFunction()
976 for (auto &Op : ICmp->operands()) { in runOnFunction()
982 if (TLI->getTypeAction(ICmp->getContext(), SrcVT) != in runOnFunction()
985 EVT PromotedVT = TLI->getTypeToTransformTo(ICmp->getContext(), SrcVT); in runOnFunction()
H A DExpandReductions.cpp51 return Instruction::ICmp; in getOpcode()
/netbsd-src/external/apache2/llvm/dist/llvm/lib/Target/WebAssembly/
H A DWebAssemblyFastISel.cpp419 if (const auto *ICmp = dyn_cast<ICmpInst>(V)) in getRegForI1Value() local
420 if (const ConstantInt *C = dyn_cast<ConstantInt>(ICmp->getOperand(1))) in getRegForI1Value()
421 if (ICmp->isEquality() && C->isZero() && C->getType()->isIntegerTy(32)) { in getRegForI1Value()
422 Not = ICmp->isTrueWhenEqual(); in getRegForI1Value()
423 return getRegForValue(ICmp->getOperand(0)); in getRegForI1Value()
1025 const auto *ICmp = cast<ICmpInst>(I); in selectICmp() local
1027 bool I32 = getSimpleType(ICmp->getOperand(0)->getType()) != MVT::i64; in selectICmp()
1030 switch (ICmp->getPredicate()) { in selectICmp()
1069 unsigned LHS = getRegForPromotedValue(ICmp->getOperand(0), IsSigned); in selectICmp()
1073 unsigned RHS = getRegForPromotedValue(ICmp->getOperand(1), IsSigned); in selectICmp()
[all …]
/netbsd-src/external/apache2/llvm/dist/llvm/lib/Target/SystemZ/
H A DSystemZTDC.cpp335 else if (I.getOpcode() == Instruction::ICmp) in runOnFunction()
378 Value *ICmp = IRB.CreateICmp(CmpInst::ICMP_NE, TDC, Zero32); in runOnFunction() local
379 I->replaceAllUsesWith(ICmp); in runOnFunction()
H A DSystemZTargetTransformInfo.cpp101 case Instruction::ICmp: in getIntImmCostInst()
882 case Instruction::ICmp: { in getCmpSelInstrCost()
908 if (Opcode == Instruction::ICmp || Opcode == Instruction::FCmp) { in getCmpSelInstrCost()
1014 case Instruction::ICmp: in isFoldableLoad()
1019 if (UserI->getOpcode() != Instruction::ICmp) { in isFoldableLoad()
1047 if (UserI->getOpcode() == Instruction::ICmp) in isFoldableLoad()
/netbsd-src/external/apache2/llvm/dist/llvm/lib/Transforms/InstCombine/
H A DInstCombineCompares.cpp1320 return ICmpInst::Create(Instruction::ICmp, Pred, Masked, Zero); in foldIRemByPowerOfTwoToBitTest()
1349 return ICmpInst::Create(Instruction::ICmp, in foldSignBitTest()
3184 return CmpInst::Create(Instruction::ICmp, ICmpInst::ICMP_EQ, X, in foldICmpIntrinsicWithConstant()
3188 return CmpInst::Create(Instruction::ICmp, ICmpInst::ICMP_NE, X, in foldICmpIntrinsicWithConstant()
3197 return CmpInst::Create(Instruction::ICmp, ICmpInst::ICMP_ULT, in foldICmpIntrinsicWithConstant()
3205 return CmpInst::Create(Instruction::ICmp, ICmpInst::ICMP_UGT, in foldICmpIntrinsicWithConstant()
3218 return CmpInst::Create(Instruction::ICmp, ICmpInst::ICMP_EQ, in foldICmpIntrinsicWithConstant()
3226 return CmpInst::Create(Instruction::ICmp, ICmpInst::ICMP_NE, in foldICmpIntrinsicWithConstant()
3760 return ICmpInst::Create(Instruction::ICmp, Pred, X, in foldICmpXNegX()
4412 static Instruction *foldICmpWithZextOrSext(ICmpInst &ICmp, in foldICmpWithZextOrSext() argument
[all …]
/netbsd-src/external/apache2/llvm/dist/llvm/lib/Analysis/
H A DIVDescriptors.cpp626 case Instruction::ICmp: in isRecurrenceInstr()
859 return Instruction::ICmp; in getOpcode()
889 if (RedOp == Instruction::ICmp || RedOp == Instruction::FCmp) in getReductionOpChain()
893 if (RedOp == Instruction::ICmp || RedOp == Instruction::FCmp) { in getReductionOpChain()
904 if (RedOp == Instruction::ICmp || RedOp == Instruction::FCmp) { in getReductionOpChain()
H A DCFLGraph.h185 return CE->getOpcode() != Instruction::ICmp && in hasUsefulEdges()
586 case Instruction::ICmp: in visitConstantExpr()
H A DCaptureTracking.cpp335 case Instruction::ICmp: { in PointerMayBeCaptured()
/netbsd-src/external/apache2/llvm/dist/llvm/lib/Transforms/Instrumentation/
H A DControlHeightReduction.cpp1521 static bool negateICmpIfUsedByBranchOrSelectOnly(ICmpInst *ICmp, in negateICmpIfUsedByBranchOrSelectOnly() argument
1524 for (User *U : ICmp->users()) { in negateICmpIfUsedByBranchOrSelectOnly()
1529 if (isa<SelectInst>(U) && cast<SelectInst>(U)->getCondition() == ICmp) in negateICmpIfUsedByBranchOrSelectOnly()
1533 for (User *U : ICmp->users()) { in negateICmpIfUsedByBranchOrSelectOnly()
1563 ICmp->setPredicate(CmpInst::getInversePredicate(ICmp->getPredicate())); in negateICmpIfUsedByBranchOrSelectOnly()
1958 if (auto *ICmp = dyn_cast<ICmpInst>(Cond)) in addToMergedCondition() local
1959 if (negateICmpIfUsedByBranchOrSelectOnly(ICmp, BranchOrSelect, Scope)) { in addToMergedCondition()
/netbsd-src/external/apache2/llvm/dist/llvm/include/llvm/CodeGen/
H A DBasicTTIImpl.h1425 thisT()->getCmpSelInstrCost(BinaryOperator::ICmp, RetTy, CondTy, in getIntrinsicInstrCost()
1676 thisT()->getCmpSelInstrCost(BinaryOperator::ICmp, RetTy, CondTy, in getTypeBasedIntrinsicInstrCost()
1703 thisT()->getCmpSelInstrCost(BinaryOperator::ICmp, RetTy, CondTy, in getTypeBasedIntrinsicInstrCost()
1771 Instruction::ICmp, SumTy, OverflowTy, in getTypeBasedIntrinsicInstrCost()
1791 thisT()->getCmpSelInstrCost(BinaryOperator::ICmp, SumTy, OverflowTy, in getTypeBasedIntrinsicInstrCost()
1822 thisT()->getCmpSelInstrCost(BinaryOperator::ICmp, MulTy, OverflowTy, in getTypeBasedIntrinsicInstrCost()
2019 thisT()->getCmpSelInstrCost(Instruction::ICmp, ValTy, in getArithmeticReductionCost()
2078 CmpOpcode = Instruction::ICmp; in getMinMaxReductionCost()
/netbsd-src/external/apache2/llvm/dist/llvm/lib/IR/
H A DConstantsContext.h334 return CE->getOpcode() == Instruction::ICmp || in classof()
635 case Instruction::ICmp:
636 return new CompareConstantExpr(Ty, Instruction::ICmp, SubclassData,
/netbsd-src/external/apache2/llvm/dist/llvm/lib/Transforms/Scalar/
H A DSpeculativeExecution.cpp246 case Instruction::ICmp: in ComputeSpeculationCost()
H A DIndVarSimplify.cpp701 ICmpInst *ICmp = dyn_cast<ICmpInst>(BI->getCondition()); in isLoopExitTestBasedOn() local
703 if (!ICmp) in isLoopExitTestBasedOn()
707 return ICmp->getOperand(0) == V || ICmp->getOperand(1) == V; in isLoopExitTestBasedOn()
/netbsd-src/external/apache2/llvm/dist/llvm/lib/Target/AMDGPU/
H A DAMDGPUPromoteAlloca.cpp647 if (ICmpInst *ICmp = dyn_cast<ICmpInst>(UseInst)) { in collectUsesWithPtrTypes() local
648 if (!binaryOpIsDerivedFromSameAlloca(BaseAlloca, Val, ICmp, 0, 1)) in collectUsesWithPtrTypes()
652 WorkList.push_back(ICmp); in collectUsesWithPtrTypes()
/netbsd-src/external/apache2/llvm/dist/llvm/lib/Target/NVPTX/
H A DNVPTXGenericToNVVM.cpp258 case Instruction::ICmp: in remapConstantExpr()
/netbsd-src/external/apache2/llvm/dist/llvm/lib/Target/ARM/
H A DMVELaneInterleavingPass.cpp233 case Instruction::ICmp: in tryInterleave()
/netbsd-src/external/apache2/llvm/dist/llvm/lib/Target/AArch64/GISel/
H A DAArch64InstructionSelector.cpp121 bool selectCompareBranchFedByICmp(MachineInstr &I, MachineInstr &ICmp,
123 bool tryOptCompareBranchFedByICmp(MachineInstr &I, MachineInstr &ICmp,
1478 MachineInstr &I, MachineInstr &ICmp, MachineIRBuilder &MIB) const { in tryOptCompareBranchFedByICmp() argument
1479 assert(ICmp.getOpcode() == TargetOpcode::G_ICMP); in tryOptCompareBranchFedByICmp()
1492 static_cast<CmpInst::Predicate>(ICmp.getOperand(1).getPredicate()); in tryOptCompareBranchFedByICmp()
1493 Register LHS = ICmp.getOperand(2).getReg(); in tryOptCompareBranchFedByICmp()
1494 Register RHS = ICmp.getOperand(3).getReg(); in tryOptCompareBranchFedByICmp()
1564 MachineInstr &I, MachineInstr &ICmp, MachineIRBuilder &MIB) const { in selectCompareBranchFedByICmp() argument
1565 assert(ICmp.getOpcode() == TargetOpcode::G_ICMP); in selectCompareBranchFedByICmp()
1567 if (tryOptCompareBranchFedByICmp(I, ICmp, MIB)) in selectCompareBranchFedByICmp()
[all …]
/netbsd-src/external/apache2/llvm/dist/llvm/include/llvm/IR/
H A DInstruction.def206 HANDLE_OTHER_INST(53, ICmp , ICmpInst ) // Integer comparison instruction
/netbsd-src/external/apache2/llvm/dist/llvm/lib/Transforms/Vectorize/
H A DVectorCombine.cpp300 assert((Opcode == Instruction::ICmp || Opcode == Instruction::FCmp) && in isExtractExtractCheap()
716 : Instruction::ICmp; in foldExtractedCmps()

1234