Lines Matching defs:ExtOpnd

4375   /// Utility function to add a promoted instruction \p ExtOpnd to
4378 Instruction *ExtOpnd, bool IsSExt) {
4380 InstrToOrigTy::iterator It = PromotedInsts.find(ExtOpnd);
4383 // PromotedInsts[ExtOpnd] is still correct.
4392 PromotedInsts[ExtOpnd] = TypeIsSExt(ExtOpnd->getType(), ExtTy);
4612 Instruction *ExtOpnd = dyn_cast<Instruction>(Ext->getOperand(0));
4618 if (!ExtOpnd || !canGetThrough(ExtOpnd, ExtTy, PromotedInsts, IsSExt))
4624 if (isa<TruncInst>(ExtOpnd) && InsertedInsts.count(ExtOpnd))
4629 if (isa<SExtInst>(ExtOpnd) || isa<TruncInst>(ExtOpnd) ||
4630 isa<ZExtInst>(ExtOpnd))
4635 if (!ExtOpnd->hasOneUse() && !TLI.isTruncateFree(ExtTy, ExtOpnd->getType()))
4696 Instruction *ExtOpnd = cast<Instruction>(Ext->getOperand(0));
4698 if (!ExtOpnd->hasOneUse()) {
4699 // ExtOpnd will be promoted.
4703 Value *Trunc = TPT.createTrunc(Ext, ExtOpnd->getType());
4706 ITrunc->moveAfter(ExtOpnd);
4711 TPT.replaceAllUsesWith(ExtOpnd, Trunc);
4714 TPT.setOperand(Ext, 0, ExtOpnd);
4724 addPromotedInst(PromotedInsts, ExtOpnd, IsSExt);
4726 TPT.mutateType(ExtOpnd, Ext->getType());
4728 TPT.replaceAllUsesWith(Ext, ExtOpnd);
4731 for (int OpIdx = 0, EndOpIdx = ExtOpnd->getNumOperands(); OpIdx != EndOpIdx;
4733 LLVM_DEBUG(dbgs() << "Operand:\n" << *(ExtOpnd->getOperand(OpIdx)) << '\n');
4734 if (ExtOpnd->getOperand(OpIdx)->getType() == Ext->getType() ||
4735 !shouldExtOperand(ExtOpnd, OpIdx)) {
4740 Value *Opnd = ExtOpnd->getOperand(OpIdx);
4746 TPT.setOperand(ExtOpnd, OpIdx, ConstantInt::get(Ext->getType(), CstVal));
4752 TPT.setOperand(ExtOpnd, OpIdx, UndefValue::get(Ext->getType()));
4758 ? TPT.createSExt(ExtOpnd, Opnd, Ext->getType())
4759 : TPT.createZExt(ExtOpnd, Opnd, Ext->getType());
4760 TPT.setOperand(ExtOpnd, OpIdx, ValForExtOpnd);
4772 return ExtOpnd;