• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /freebsd-13-stable/contrib/llvm-project/llvm/lib/Transforms/Utils/

Lines Matching defs:Cond

218   bool SimplifyTerminatorOnSelect(Instruction *OldTerm, Value *Cond,
281 Instruction *Cond,
290 // 2> We have "Cond" as the incoming value for the unconditional branch;
291 // 3> SI2->getCondition() and Cond have same operands.
295 if (!(Cond->getOperand(0) == Ci2->getOperand(0) &&
296 Cond->getOperand(1) == Ci2->getOperand(1)) &&
297 !(Cond->getOperand(0) == Ci2->getOperand(1) &&
298 Cond->getOperand(1) == Ci2->getOperand(0)))
308 if (PN->getIncomingValueForBlock(SI1BB) != Cond ||
483 /// Construct and compute the result for the comparison instruction Cond
484 ConstantComparesGatherer(Instruction *Cond, const DataLayout &DL) : DL(DL) {
485 gather(Cond);
701 Instruction *Cond = nullptr;
703 Cond = dyn_cast<Instruction>(SI->getCondition());
706 Cond = dyn_cast<Instruction>(BI->getCondition());
708 Cond = dyn_cast<Instruction>(IBI->getAddress());
712 if (Cond)
713 RecursivelyDeleteTriviallyDeadInstructions(Cond, nullptr, MSSAU);
1790 Instruction *Cond = nullptr;
1795 else if ((isa<BranchInst>(T) || isa<SwitchInst>(T)) && !Cond)
1796 Cond = T;
1837 if (ScanIdx > 0 && Cond) {
2633 Instruction *Cond = nullptr;
2635 Cond = dyn_cast<Instruction>(BI->getCondition());
2651 Cond = Curr;
2661 if (!Cond)
2665 if (!Cond || (!isa<CmpInst>(Cond) && !isa<BinaryOperator>(Cond)) ||
2666 Cond->getParent() != BB || !Cond->hasOneUse())
2670 BasicBlock::iterator CondIt = ++Cond->getIterator();
2686 for (auto I = BB->begin(); Cond != &*I; ++I) {
2696 // I is used in the same BB. Since BI uses Cond and doesn't have more slots
2698 // and Cond.
2708 // Cond is known to be a compare or binary operator. Check to make sure that
2710 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(Cond->getOperand(0)))
2713 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(Cond->getOperand(1)))
2734 !isProfitableToFoldUnconditional(BI, PBI, Cond, PHIs)))
2785 // We already make sure Cond is the last instruction before BI. Therefore,
2786 // all instructions before Cond other than DbgInfoIntrinsic are bonus
2788 for (auto BonusInst = BB->begin(); Cond != &*BonusInst; ++BonusInst) {
2814 // Clone Cond into the predecessor basic block, and or/and the
2816 Instruction *CondInPred = Cond->clone();
2825 CondInPred->takeName(Cond);
2826 Cond->setName(CondInPred->getName() + ".old");
3479 Value *Cond = Builder.CreateOr(PBICond, BICond, "brmerge");
3482 PBI->setCondition(Cond);
3555 // Simplifies a terminator by replacing it with a branch to TrueBB if Cond is
3556 // true or to FalseBB if Cond is false.
3561 Value *Cond, BasicBlock *TrueBB,
3596 BranchInst *NewBI = Builder.CreateCondBr(Cond, TrueBB, FalseBB);
3800 Instruction *Cond = dyn_cast<Instruction>(BI->getCondition());
3801 if (!Cond)
3809 ConstantComparesGatherer ConstantCompare(Cond, DL);
3824 bool TrueWhenEqual = (Cond->getOpcode() == Instruction::Or);
4344 Value* Cond = BI->getCondition();
4346 Builder.CreateAssumption(Builder.CreateNot(Cond));
4350 Builder.CreateAssumption(Cond);
4571 Value *Cond = SI->getCondition();
4572 unsigned Bits = Cond->getType()->getIntegerBitWidth();
4573 KnownBits Known = computeKnownBits(Cond, DL, 0, AC, SI);
4578 unsigned ExtraSignBits = ComputeNumSignBits(Cond, DL, 0, AC, SI) - 1;
5002 Value *const Cond = SI->getCondition();
5018 ConvertTwoCaseSwitch(UniqueResults, DefaultResult, Cond, Builder);
5756 Value *Cond = SI->getCondition();
5757 if (SelectInst *Select = dyn_cast<SelectInst>(Cond))