Lines Matching defs:ExtOpnd
4662 /// Utility function to add a promoted instruction \p ExtOpnd to
4665 Instruction *ExtOpnd, bool IsSExt) {
4667 InstrToOrigTy::iterator It = PromotedInsts.find(ExtOpnd);
4670 // PromotedInsts[ExtOpnd] is still correct.
4679 PromotedInsts[ExtOpnd] = TypeIsSExt(ExtOpnd->getType(), ExtTy);
4899 Instruction *ExtOpnd = dyn_cast<Instruction>(Ext->getOperand(0));
4905 if (!ExtOpnd || !canGetThrough(ExtOpnd, ExtTy, PromotedInsts, IsSExt))
4911 if (isa<TruncInst>(ExtOpnd) && InsertedInsts.count(ExtOpnd))
4916 if (isa<SExtInst>(ExtOpnd) || isa<TruncInst>(ExtOpnd) ||
4917 isa<ZExtInst>(ExtOpnd))
4922 if (!ExtOpnd->hasOneUse() && !TLI.isTruncateFree(ExtTy, ExtOpnd->getType()))
4983 Instruction *ExtOpnd = cast<Instruction>(Ext->getOperand(0));
4985 if (!ExtOpnd->hasOneUse()) {
4986 // ExtOpnd will be promoted.
4990 Value *Trunc = TPT.createTrunc(Ext, ExtOpnd->getType());
4993 ITrunc->moveAfter(ExtOpnd);
4998 TPT.replaceAllUsesWith(ExtOpnd, Trunc);
5001 TPT.setOperand(Ext, 0, ExtOpnd);
5011 addPromotedInst(PromotedInsts, ExtOpnd, IsSExt);
5013 TPT.mutateType(ExtOpnd, Ext->getType());
5015 TPT.replaceAllUsesWith(Ext, ExtOpnd);
5018 for (int OpIdx = 0, EndOpIdx = ExtOpnd->getNumOperands(); OpIdx != EndOpIdx;
5020 LLVM_DEBUG(dbgs() << "Operand:\n" << *(ExtOpnd->getOperand(OpIdx)) << '\n');
5021 if (ExtOpnd->getOperand(OpIdx)->getType() == Ext->getType() ||
5022 !shouldExtOperand(ExtOpnd, OpIdx)) {
5027 Value *Opnd = ExtOpnd->getOperand(OpIdx);
5033 TPT.setOperand(ExtOpnd, OpIdx, ConstantInt::get(Ext->getType(), CstVal));
5039 TPT.setOperand(ExtOpnd, OpIdx, UndefValue::get(Ext->getType()));
5045 ? TPT.createSExt(ExtOpnd, Opnd, Ext->getType())
5046 : TPT.createZExt(ExtOpnd, Opnd, Ext->getType());
5047 TPT.setOperand(ExtOpnd, OpIdx, ValForExtOpnd);
5059 return ExtOpnd;