Lines Matching defs:Ext

3754   /// Utility function to promote the operand of \p Ext when this
3758 /// created to promote the operand of Ext.
3762 /// \return The promoted value which is used instead of Ext.
3764 Instruction *Ext, TypePromotionTransaction &TPT,
3769 /// Utility function to promote the operand of \p Ext when this
3773 /// created to promote the operand of Ext.
3777 /// \return The promoted value which is used instead of Ext.
3778 static Value *promoteOperandForOther(Instruction *Ext,
3788 Instruction *Ext, TypePromotionTransaction &TPT,
3792 return promoteOperandForOther(Ext, TPT, PromotedInsts, CreatedInstsCost,
3798 Instruction *Ext, TypePromotionTransaction &TPT,
3802 return promoteOperandForOther(Ext, TPT, PromotedInsts, CreatedInstsCost,
3807 /// Type for the utility function that promotes the operand of Ext.
3808 using Action = Value *(*)(Instruction *Ext, TypePromotionTransaction &TPT,
3815 /// Given a sign/zero extend instruction \p Ext, return the appropriate
3816 /// action to promote the operand of \p Ext instead of using Ext.
3824 static Action getAction(Instruction *Ext, const SetOfInstrs &InsertedInsts,
3934 Instruction *Ext, const SetOfInstrs &InsertedInsts,
3936 assert((isa<SExtInst>(Ext) || isa<ZExtInst>(Ext)) &&
3938 Instruction *ExtOpnd = dyn_cast<Instruction>(Ext->getOperand(0));
3939 Type *ExtTy = Ext->getType();
3940 bool IsSExt = isa<SExtInst>(Ext);
4015 Instruction *Ext, TypePromotionTransaction &TPT,
4020 // By construction, the operand of Ext is an instruction. Otherwise we cannot
4022 Instruction *ExtOpnd = cast<Instruction>(Ext->getOperand(0));
4026 // All its uses, but Ext, will need to use a truncated value of the
4029 Value *Trunc = TPT.createTrunc(Ext, ExtOpnd->getType());
4038 // Restore the operand of Ext (which has been replaced by the previous call
4040 TPT.setOperand(Ext, 0, ExtOpnd);
4045 // 2. Replace the uses of Ext by Inst.
4052 TPT.mutateType(ExtOpnd, Ext->getType());
4054 TPT.replaceAllUsesWith(Ext, ExtOpnd);
4056 Instruction *ExtForOpnd = Ext;
4058 LLVM_DEBUG(dbgs() << "Propagate Ext to operands\n");
4062 if (ExtOpnd->getOperand(OpIdx)->getType() == Ext->getType() ||
4071 unsigned BitWidth = Ext->getType()->getIntegerBitWidth();
4074 TPT.setOperand(ExtOpnd, OpIdx, ConstantInt::get(Ext->getType(), CstVal));
4080 TPT.setOperand(ExtOpnd, OpIdx, UndefValue::get(Ext->getType()));
4085 // Check if Ext was reused to extend an operand.
4089 Value *ValForExtOpnd = IsSExt ? TPT.createSExt(Ext, Opnd, Ext->getType())
4090 : TPT.createZExt(Ext, Opnd, Ext->getType());
4108 if (ExtForOpnd == Ext) {
4110 TPT.eraseInstruction(Ext);
4357 Instruction *Ext = dyn_cast<Instruction>(AddrInst);
4358 if (!Ext)
4364 TypePromotionHelper::getAction(Ext, InsertedInsts, TLI, PromotedInsts);
4371 unsigned ExtCost = !TLI.isExtFree(Ext);
4373 TPH(Ext, TPT, PromotedInsts, CreatedInstsCost, nullptr, nullptr, TLI);