Home
last modified time | relevance | path

Searched refs:CmpI (Results 1 – 19 of 19) sorted by relevance

/llvm-project-15.0.7/llvm/lib/Transforms/Scalar/
H A DMergeICmps.cpp186 const ICmpInst *CmpI; member
189 : Lhs(std::move(L)), Rhs(std::move(R)), SizeBits(SizeBits), CmpI(CmpI) { in BCECmp()
303 Optional<BCECmp> visitICmp(const ICmpInst *const CmpI, in visitICmp() argument
311 if (!CmpI->hasOneUse()) { in visitICmp()
315 if (CmpI->getPredicate() != ExpectedPredicate) in visitICmp()
320 auto Lhs = visitICmpLoadOperand(CmpI->getOperand(0), BaseId); in visitICmp()
323 auto Rhs = visitICmpLoadOperand(CmpI->getOperand(1), BaseId); in visitICmp()
326 const auto &DL = CmpI->getModule()->getDataLayout(); in visitICmp()
328 DL.getTypeSizeInBits(CmpI->getOperand(0)->getType()), CmpI); in visitICmp()
363 auto *CmpI = dyn_cast<ICmpInst>(Cond); in visitCmpBlock() local
[all …]
H A DLowerExpectIntrinsic.cpp275 ICmpInst *CmpI = dyn_cast<ICmpInst>(BSI.getCondition()); in handleBrSelExpect() local
278 if (!CmpI) { in handleBrSelExpect()
282 Predicate = CmpI->getPredicate(); in handleBrSelExpect()
286 CmpConstOperand = dyn_cast<ConstantInt>(CmpI->getOperand(1)); in handleBrSelExpect()
289 CI = dyn_cast<CallInst>(CmpI->getOperand(0)); in handleBrSelExpect()
331 if (CmpI) in handleBrSelExpect()
332 CmpI->setOperand(0, ArgValue); in handleBrSelExpect()
H A DConstraintElimination.cpp565 auto *CmpI = dyn_cast<ICmpInst>(Br->getCondition()); in addInfoFor() local
566 if (!CmpI) in addInfoFor()
569 WorkList.emplace_back(DT.getNode(Br->getSuccessor(0)), CmpI, false); in addInfoFor()
571 WorkList.emplace_back(DT.getNode(Br->getSuccessor(1)), CmpI, true); in addInfoFor()
H A DGVN.cpp1971 if (auto *CmpI = dyn_cast<CmpInst>(V)) { in processAssumeIntrinsic() local
1972 if (impliesEquivalanceIfTrue(CmpI)) { in processAssumeIntrinsic()
1973 Value *CmpLHS = CmpI->getOperand(0); in processAssumeIntrinsic()
1974 Value *CmpRHS = CmpI->getOperand(1); in processAssumeIntrinsic()
/llvm-project-15.0.7/llvm/lib/Target/Lanai/
H A DLanaiInstrInfo.cpp205 inline static bool isRedundantFlagInstr(MachineInstr *CmpI, unsigned SrcReg, in isRedundantFlagInstr() argument
208 if (CmpI->getOpcode() == Lanai::SFSUB_F_RR && in isRedundantFlagInstr()
216 if (((CmpI->getOpcode() == Lanai::SFSUB_F_RI_LO && in isRedundantFlagInstr()
218 (CmpI->getOpcode() == Lanai::SFSUB_F_RI_HI && in isRedundantFlagInstr()
/llvm-project-15.0.7/llvm/lib/Target/Hexagon/
H A DHexagonHardwareLoops.cpp233 bool orderBumpCompare(MachineInstr *BumpI, MachineInstr *CmpI);
1317 MachineInstr *CmpI) { in orderBumpCompare() argument
1318 assert (BumpI != CmpI && "Bump and compare in the same instruction?"); in orderBumpCompare()
1321 if (CmpI->getParent() != BB) in orderBumpCompare()
1328 if (&*I == CmpI) in orderBumpCompare()
1332 Register PredR = CmpI->getOperand(0).getReg(); in orderBumpCompare()
1334 instr_iterator CmpIt = CmpI->getIterator(), NextIt = std::next(CmpIt); in orderBumpCompare()
1346 BB->splice(++BumpI->getIterator(), BB, CmpI->getIterator()); in orderBumpCompare()
H A DHexagonSplitDouble.cpp507 const MachineInstr *CmpI = MRI->getVRegDef(PR); in collectIndRegsForLoop() local
508 while (CmpI->getOpcode() == Hexagon::C2_not) in collectIndRegsForLoop()
509 CmpI = MRI->getVRegDef(CmpI->getOperand(1).getReg()); in collectIndRegsForLoop()
512 bool OkCI = TII->analyzeCompare(*CmpI, CmpR1, CmpR2, Mask, Val); in collectIndRegsForLoop()
/llvm-project-15.0.7/llvm/include/llvm/Frontend/OpenMP/
H A DOMPIRBuilder.h1767 Instruction *CmpI = &Cond->front(); in getTripCount() local
1768 assert(isa<CmpInst>(CmpI) && "First inst must compare IV with TripCount"); in getTripCount()
1769 return CmpI->getOperand(1); in getTripCount()
/llvm-project-15.0.7/llvm/lib/Target/ARM/
H A DARMInstructionSelector.cpp579 auto CmpI = in insertComparison() local
584 if (!constrainSelectedInstRegOperands(*CmpI, TII, TRI, RBI)) in insertComparison()
777 auto CmpI = BuildMI(MBB, InsertBefore, DbgLoc, TII.get(Opcodes.TSTri)) in selectSelect() local
781 if (!constrainSelectedInstRegOperands(*CmpI, TII, TRI, RBI)) in selectSelect()
H A DARMBaseInstrInfo.cpp2868 inline static bool isRedundantFlagInstr(const MachineInstr *CmpI, in isRedundantFlagInstr() argument
2873 if ((CmpI->getOpcode() == ARM::CMPrr || CmpI->getOpcode() == ARM::t2CMPrr) && in isRedundantFlagInstr()
2883 if (CmpI->getOpcode() == ARM::tCMPr && OI->getOpcode() == ARM::tSUBrr && in isRedundantFlagInstr()
2892 if ((CmpI->getOpcode() == ARM::CMPri || CmpI->getOpcode() == ARM::t2CMPri) && in isRedundantFlagInstr()
2900 if (CmpI->getOpcode() == ARM::tCMPi8 && in isRedundantFlagInstr()
2908 if ((CmpI->getOpcode() == ARM::CMPrr || CmpI->getOpcode() == ARM::t2CMPrr) && in isRedundantFlagInstr()
2918 if (CmpI->getOpcode() == ARM::tCMPr && in isRedundantFlagInstr()
/llvm-project-15.0.7/llvm/lib/Analysis/
H A DValueTracking.cpp6274 if (CmpI->isUnsigned()) in lookThroughCast()
6278 if (CmpI->isSigned()) in lookThroughCast()
6283 if (match(CmpI->getOperand(1), m_Constant(CmpConst)) && in lookThroughCast()
6354 CmpInst *CmpI = dyn_cast<CmpInst>(SI->getCondition()); in matchSelectPattern() local
6355 if (!CmpI) return {SPF_UNKNOWN, SPNB_NA, false}; in matchSelectPattern()
6367 CmpInst::Predicate Pred = CmpI->getPredicate(); in matchDecomposedSelectPattern()
6368 Value *CmpLHS = CmpI->getOperand(0); in matchDecomposedSelectPattern()
6369 Value *CmpRHS = CmpI->getOperand(1); in matchDecomposedSelectPattern()
6371 if (isa<FPMathOperator>(CmpI)) in matchDecomposedSelectPattern()
6372 FMF = CmpI->getFastMathFlags(); in matchDecomposedSelectPattern()
[all …]
/llvm-project-15.0.7/llvm/lib/Transforms/Utils/
H A DCloneFunction.cpp418 if (const auto *CmpI = dyn_cast<FCmpInst>(&OldInst)) { in cloneInstruction() local
419 FCmpInst::Predicate Pred = CmpI->getPredicate(); in cloneInstruction()
/llvm-project-15.0.7/llvm/include/llvm/Analysis/
H A DValueTracking.h770 CmpInst *CmpI, Value *TrueVal, Value *FalseVal, Value *&LHS, Value *&RHS,
/llvm-project-15.0.7/llvm/lib/CodeGen/
H A DCodeGenPrepare.cpp8009 Instruction *CmpI = nullptr; in optimizeInst() local
8011 CmpI = II; in optimizeInst()
8013 CmpI = F->getFastMathFlags().none() ? F : nullptr; in optimizeInst()
8015 if (CmpI && CmpI->hasOneUse()) { in optimizeInst()
8016 auto Op0 = CmpI->getOperand(0), Op1 = CmpI->getOperand(1); in optimizeInst()
8023 auto *F = new FreezeInst(Const0 ? Op1 : Op0, "", CmpI); in optimizeInst()
8025 CmpI->setOperand(Const0 ? 1 : 0, F); in optimizeInst()
8027 FI->replaceAllUsesWith(CmpI); in optimizeInst()
/llvm-project-15.0.7/llvm/lib/Frontend/OpenMP/
H A DOMPIRBuilder.cpp4443 Instruction *CmpI = &getCond()->front(); in setTripCount() local
4444 assert(isa<CmpInst>(CmpI) && "First inst must compare IV with TripCount"); in setTripCount()
4445 CmpI->setOperand(1, TripCount); in setTripCount()
4569 auto *CmpI = cast<CmpInst>(&Cond->front()); in assertOK() local
4570 assert(CmpI->getPredicate() == CmpInst::ICMP_ULT && in assertOK()
4572 assert(CmpI->getOperand(0) == IndVar && in assertOK()
4574 assert(CmpI->getOperand(1) == TripCount && in assertOK()
/llvm-project-15.0.7/llvm/lib/Transforms/IPO/
H A DAttributorAttributes.cpp8436 calculateCmpInst(Attributor &A, CmpInst *CmpI, IntegerRangeState &T, in calculateCmpInst()
8439 Value *LHS = CmpI->getOperand(0); in calculateCmpInst()
8440 Value *RHS = CmpI->getOperand(1); in calculateCmpInst()
8484 ConstantRange::makeAllowedICmpRegion(CmpI->getPredicate(), RHSAARange); in calculateCmpInst()
8489 if (LHSAARange.icmp(CmpI->getPredicate(), RHSAARange)) in calculateCmpInst()
8502 LLVM_DEBUG(dbgs() << "[AAValueConstantRange] " << *CmpI << " " << LHSAA in calculateCmpInst()
8543 } else if (auto *CmpI = dyn_cast<CmpInst>(I)) { in updateImpl() local
8544 if (!calculateCmpInst(A, CmpI, T, CtxI, QuerriedAAs)) in updateImpl()
H A DOpenMPOpt.cpp3936 Instruction *CmpI = ICmpInst::Create( in buildCustomStateMachine() local
3939 CmpI->setDebugLoc(DLoc); in buildCustomStateMachine()
3940 IsPR = CmpI; in buildCustomStateMachine()
/llvm-project-15.0.7/clang/lib/CodeGen/
H A DCGStmtOpenMP.cpp3666 llvm::Value *CmpI = CGF.Builder.CreateICmpUGE(NMin1, Pow2K); in emitScanBasedDirective() local
3667 CGF.Builder.CreateCondBr(CmpI, InnerLoopBB, InnerExitBB); in emitScanBasedDirective()
3710 CmpI = CGF.Builder.CreateICmpUGE(NextIVal, Pow2K); in emitScanBasedDirective()
3711 CGF.Builder.CreateCondBr(CmpI, InnerLoopBB, InnerExitBB); in emitScanBasedDirective()
/llvm-project-15.0.7/llvm/lib/CodeGen/SelectionDAG/
H A DSelectionDAGBuilder.cpp7596 if (const auto *CmpI = dyn_cast<VPCmpIntrinsic>(&VPIntrin)) in visitVectorPredicationIntrinsic() local
7597 return visitVPCmp(*CmpI); in visitVectorPredicationIntrinsic()