Lines Matching refs:Trunc
242 else if (auto *Trunc = dyn_cast<TruncInst>(V))
243 return EqualTypeSize(Trunc);
564 LLVM_DEBUG(dbgs() << "IR Promotion: Creating " << *TruncTy << " Trunc for "
567 auto *Trunc = dyn_cast<Instruction>(Builder.CreateTrunc(V, TruncTy));
568 if (Trunc)
569 NewInsts.insert(Trunc);
570 return Trunc;
583 if (Instruction *Trunc = InsertTrunc(Arg, Ty)) {
584 Trunc->moveBefore(Call);
585 Call->setArgOperand(i, Trunc);
594 if (Instruction *Trunc = InsertTrunc(Switch->getCondition(), Ty)) {
595 Trunc->moveBefore(Switch);
596 Switch->setCondition(Trunc);
604 if (Instruction *Trunc = InsertTrunc(I->getOperand(i), Ty)) {
605 Trunc->moveBefore(I);
606 I->setOperand(i, Trunc);
637 auto *Trunc = cast<TruncInst>(Src);
638 assert(Trunc->getOperand(0)->getType() == ExtTy &&
640 ReplaceAllUsersOfWith(ZExt, Trunc->getOperand(0));
659 auto *Trunc = cast<TruncInst>(V);
660 Builder.SetInsertPoint(Trunc);
661 IntegerType *SrcTy = cast<IntegerType>(Trunc->getOperand(0)->getType());
662 IntegerType *DestTy = cast<IntegerType>(TruncTysMap[Trunc][0]);
667 Value *Masked = Builder.CreateAnd(Trunc->getOperand(0), Mask);
672 ReplaceAllUsersOfWith(Trunc, Masked);
697 auto *Trunc = cast<TruncInst>(V);
698 TruncTysMap[Trunc].push_back(Trunc->getDestTy());
761 case Instruction::Trunc: