Lines Matching refs:NarrowUse
709 Instruction *NarrowUse; member
712 NarrowIVDefUse(): NarrowDef(nullptr), NarrowUse(nullptr), WideDef(nullptr) {} in NarrowIVDefUse()
715 NarrowDef(ND), NarrowUse(NU), WideDef(WD) {} in NarrowIVDefUse()
770 const SCEVAddRecExpr *GetWideRecurrence(Instruction *NarrowUse);
814 unsigned Opcode = DU.NarrowUse->getOpcode(); in CloneIVUser()
828 DEBUG(dbgs() << "Cloning IVUser: " << *DU.NarrowUse << "\n"); in CloneIVUser()
835 Value *LHS = (DU.NarrowUse->getOperand(0) == DU.NarrowDef) ? DU.WideDef : in CloneIVUser()
836 getExtend(DU.NarrowUse->getOperand(0), WideType, IsSigned, DU.NarrowUse); in CloneIVUser()
837 Value *RHS = (DU.NarrowUse->getOperand(1) == DU.NarrowDef) ? DU.WideDef : in CloneIVUser()
838 getExtend(DU.NarrowUse->getOperand(1), WideType, IsSigned, DU.NarrowUse); in CloneIVUser()
840 BinaryOperator *NarrowBO = cast<BinaryOperator>(DU.NarrowUse); in CloneIVUser()
844 IRBuilder<> Builder(DU.NarrowUse); in CloneIVUser()
874 const unsigned OpCode = DU.NarrowUse->getOpcode(); in GetExtendedOperandRecurrence()
883 DU.NarrowUse->getOperand(0) == DU.NarrowDef ? 1 : 0; in GetExtendedOperandRecurrence()
884 assert(DU.NarrowUse->getOperand(1-ExtendOperIdx) == DU.NarrowDef && "bad DU"); in GetExtendedOperandRecurrence()
888 cast<OverflowingBinaryOperator>(DU.NarrowUse); in GetExtendedOperandRecurrence()
891 SE->getSCEV(DU.NarrowUse->getOperand(ExtendOperIdx)), WideType); in GetExtendedOperandRecurrence()
894 SE->getSCEV(DU.NarrowUse->getOperand(ExtendOperIdx)), WideType); in GetExtendedOperandRecurrence()
923 const SCEVAddRecExpr *WidenIV::GetWideRecurrence(Instruction *NarrowUse) { in GetWideRecurrence() argument
924 if (!SE->isSCEVable(NarrowUse->getType())) in GetWideRecurrence()
927 const SCEV *NarrowExpr = SE->getSCEV(NarrowUse); in GetWideRecurrence()
948 << " for user " << *DU.NarrowUse << "\n"); in truncateIVUse()
949 IRBuilder<> Builder(getInsertPointForUses(DU.NarrowUse, DU.NarrowDef, DT)); in truncateIVUse()
951 DU.NarrowUse->replaceUsesOfWith(DU.NarrowDef, Trunc); in truncateIVUse()
958 ICmpInst *Cmp = dyn_cast<ICmpInst>(DU.NarrowUse); in WidenLoopCompare()
972 IRBuilder<> Builder(getInsertPointForUses(DU.NarrowUse, DU.NarrowDef, DT)); in WidenLoopCompare()
973 DU.NarrowUse->replaceUsesOfWith(DU.NarrowDef, DU.WideDef); in WidenLoopCompare()
978 DU.NarrowUse->replaceUsesOfWith(Op, ExtOp); in WidenLoopCompare()
988 if (PHINode *UsePhi = dyn_cast<PHINode>(DU.NarrowUse)) { in WidenIVUse()
1011 if (IsSigned ? isa<SExtInst>(DU.NarrowUse) : isa<ZExtInst>(DU.NarrowUse)) { in WidenIVUse()
1013 if (DU.NarrowUse->getType() != WideType) { in WidenIVUse()
1014 unsigned CastWidth = SE->getTypeSizeInBits(DU.NarrowUse->getType()); in WidenIVUse()
1018 IRBuilder<> Builder(DU.NarrowUse); in WidenIVUse()
1019 NewDef = Builder.CreateTrunc(DU.WideDef, DU.NarrowUse->getType()); in WidenIVUse()
1026 << " not wide enough to subsume " << *DU.NarrowUse << "\n"); in WidenIVUse()
1027 DU.NarrowUse->replaceUsesOfWith(DU.NarrowDef, DU.WideDef); in WidenIVUse()
1028 NewDef = DU.NarrowUse; in WidenIVUse()
1031 if (NewDef != DU.NarrowUse) { in WidenIVUse()
1032 DEBUG(dbgs() << "INDVARS: eliminating " << *DU.NarrowUse in WidenIVUse()
1035 DU.NarrowUse->replaceAllUsesWith(NewDef); in WidenIVUse()
1036 DeadInsts.push_back(DU.NarrowUse); in WidenIVUse()
1049 const SCEVAddRecExpr *WideAddRec = GetWideRecurrence(DU.NarrowUse); in WidenIVUse()
1067 assert(DU.NarrowUse != DU.NarrowUse->getParent()->getTerminator() && in WidenIVUse()
1074 && Rewriter.hoistIVInc(WideInc, DU.NarrowUse)) in WidenIVUse()
1182 pushNarrowIVUsers(DU.NarrowUse, WideUse); in CreateWideIV()