Lines Matching defs:Opnd
3111 /// Build a truncate instruction of \p Opnd producing a \p Ty
3113 /// trunc Opnd to Ty.
3114 TruncBuilder(Instruction *Opnd, Type *Ty) : TypePromotionAction(Opnd) {
3115 IRBuilder<> Builder(Opnd);
3117 Val = Builder.CreateTrunc(Opnd, Ty, "promoted");
3137 /// Build a sign extension instruction of \p Opnd producing a \p Ty
3139 /// sext Opnd to Ty.
3140 SExtBuilder(Instruction *InsertPt, Value *Opnd, Type *Ty)
3143 Val = Builder.CreateSExt(Opnd, Ty, "promoted");
3163 /// Build a zero extension instruction of \p Opnd producing a \p Ty
3165 /// zext Opnd to Ty.
3166 ZExtBuilder(Instruction *InsertPt, Value *Opnd, Type *Ty)
3170 Val = Builder.CreateZExt(Opnd, Ty, "promoted");
3356 Value *createTrunc(Instruction *Opnd, Type *Ty);
3359 Value *createSExt(Instruction *Inst, Value *Opnd, Type *Ty);
3362 Value *createZExt(Instruction *Inst, Value *Opnd, Type *Ty);
3400 Value *TypePromotionTransaction::createTrunc(Instruction *Opnd, Type *Ty) {
3401 std::unique_ptr<TruncBuilder> Ptr(new TruncBuilder(Opnd, Ty));
3407 Value *TypePromotionTransaction::createSExt(Instruction *Inst, Value *Opnd,
3409 std::unique_ptr<SExtBuilder> Ptr(new SExtBuilder(Inst, Opnd, Ty));
3415 Value *TypePromotionTransaction::createZExt(Instruction *Inst, Value *Opnd,
3417 std::unique_ptr<ZExtBuilder> Ptr(new ZExtBuilder(Inst, Opnd, Ty));
4395 /// Utility function to query the original type of instruction \p Opnd
4400 Instruction *Opnd, bool IsSExt) {
4402 InstrToOrigTy::const_iterator It = PromotedInsts.find(Opnd);
4586 Instruction *Opnd = dyn_cast<Instruction>(OpndVal);
4587 if (!Opnd)
4594 const Type *OpndType = getOrigType(PromotedInsts, Opnd, IsSExt);
4597 else if ((IsSExt && isa<SExtInst>(Opnd)) || (!IsSExt && isa<ZExtInst>(Opnd)))
4598 OpndType = Opnd->getOperand(0)->getType();
4740 Value *Opnd = ExtOpnd->getOperand(OpIdx);
4741 if (const ConstantInt *Cst = dyn_cast<ConstantInt>(Opnd)) {
4750 if (isa<UndefValue>(Opnd)) {
4758 ? TPT.createSExt(ExtOpnd, Opnd, Ext->getType())
4759 : TPT.createZExt(ExtOpnd, Opnd, Ext->getType());