• Home
  • Raw
  • Download

Lines Matching refs:TI

120 Instruction *InstCombiner::FoldSelectOpOp(SelectInst &SI, Instruction *TI,  in FoldSelectOpOp()  argument
123 if (TI->getNumOperands() == 1 && TI->isCast()) { in FoldSelectOpOp()
125 if (TI->getOperand(0)->getType() != FIOpndTy) in FoldSelectOpOp()
145 if (TI->getOpcode() != Instruction::BitCast && in FoldSelectOpOp()
146 (!TI->hasOneUse() || !FI->hasOneUse())) in FoldSelectOpOp()
149 } else if (!TI->hasOneUse() || !FI->hasOneUse()) { in FoldSelectOpOp()
157 Value *NewSI = Builder->CreateSelect(SI.getCondition(), TI->getOperand(0), in FoldSelectOpOp()
159 return CastInst::Create(Instruction::CastOps(TI->getOpcode()), NewSI, in FoldSelectOpOp()
160 TI->getType()); in FoldSelectOpOp()
169 if (!isa<BinaryOperator>(TI) || !TI->hasOneUse() || !FI->hasOneUse()) in FoldSelectOpOp()
175 if (TI->getOperand(0) == FI->getOperand(0)) { in FoldSelectOpOp()
176 MatchOp = TI->getOperand(0); in FoldSelectOpOp()
177 OtherOpT = TI->getOperand(1); in FoldSelectOpOp()
180 } else if (TI->getOperand(1) == FI->getOperand(1)) { in FoldSelectOpOp()
181 MatchOp = TI->getOperand(1); in FoldSelectOpOp()
182 OtherOpT = TI->getOperand(0); in FoldSelectOpOp()
185 } else if (!TI->isCommutative()) { in FoldSelectOpOp()
187 } else if (TI->getOperand(0) == FI->getOperand(1)) { in FoldSelectOpOp()
188 MatchOp = TI->getOperand(0); in FoldSelectOpOp()
189 OtherOpT = TI->getOperand(1); in FoldSelectOpOp()
192 } else if (TI->getOperand(1) == FI->getOperand(0)) { in FoldSelectOpOp()
193 MatchOp = TI->getOperand(1); in FoldSelectOpOp()
194 OtherOpT = TI->getOperand(0); in FoldSelectOpOp()
205 if (BinaryOperator *BO = dyn_cast<BinaryOperator>(TI)) { in FoldSelectOpOp()
847 auto *TI = dyn_cast<Instruction>(TrueVal); in foldAddSubSelect() local
849 if (!TI || !FI || !TI->hasOneUse() || !FI->hasOneUse()) in foldAddSubSelect()
853 if ((TI->getOpcode() == Instruction::Sub && in foldAddSubSelect()
855 (TI->getOpcode() == Instruction::FSub && in foldAddSubSelect()
858 SubOp = TI; in foldAddSubSelect()
860 TI->getOpcode() == Instruction::Add) || in foldAddSubSelect()
862 TI->getOpcode() == Instruction::FAdd)) { in foldAddSubSelect()
863 AddOp = TI; in foldAddSubSelect()
892 if (AddOp != TI) in foldAddSubSelect()
1092 auto *TI = dyn_cast<Instruction>(TrueVal); in visitSelectInst() local
1094 if (TI && FI && TI->getOpcode() == FI->getOpcode()) in visitSelectInst()
1095 if (Instruction *IV = FoldSelectOpOp(SI, TI, FI)) in visitSelectInst()