Lines Matching refs:NarrowUse

832   Instruction *NarrowUse = nullptr;  member
842 : NarrowDef(ND), NarrowUse(NU), WideDef(WD), in NarrowIVDefUse()
901 const SCEVAddRecExpr *getWideRecurrence(Instruction *NarrowUse);
946 unsigned Opcode = DU.NarrowUse->getOpcode(); in cloneIVUser()
967 Instruction *NarrowUse = DU.NarrowUse; in cloneBitwiseIVUser() local
971 DEBUG(dbgs() << "Cloning bitwise IVUser: " << *NarrowUse << "\n"); in cloneBitwiseIVUser()
977 Value *LHS = (NarrowUse->getOperand(0) == NarrowDef) in cloneBitwiseIVUser()
979 : createExtendInst(NarrowUse->getOperand(0), WideType, in cloneBitwiseIVUser()
980 IsSigned, NarrowUse); in cloneBitwiseIVUser()
981 Value *RHS = (NarrowUse->getOperand(1) == NarrowDef) in cloneBitwiseIVUser()
983 : createExtendInst(NarrowUse->getOperand(1), WideType, in cloneBitwiseIVUser()
984 IsSigned, NarrowUse); in cloneBitwiseIVUser()
986 auto *NarrowBO = cast<BinaryOperator>(NarrowUse); in cloneBitwiseIVUser()
989 IRBuilder<> Builder(NarrowUse); in cloneBitwiseIVUser()
997 Instruction *NarrowUse = DU.NarrowUse; in cloneArithmeticIVUser() local
1001 DEBUG(dbgs() << "Cloning arithmetic IVUser: " << *NarrowUse << "\n"); in cloneArithmeticIVUser()
1003 unsigned IVOpIdx = (NarrowUse->getOperand(0) == NarrowDef) ? 0 : 1; in cloneArithmeticIVUser()
1026 const SCEV *NarrowRHS = SE->getSCEV(NarrowUse->getOperand(1)); in cloneArithmeticIVUser()
1029 const SCEV *NarrowLHS = SE->getSCEV(NarrowUse->getOperand(0)); in cloneArithmeticIVUser()
1037 switch (NarrowUse->getOpcode()) { in cloneArithmeticIVUser()
1068 Value *LHS = (NarrowUse->getOperand(0) == NarrowDef) in cloneArithmeticIVUser()
1070 : createExtendInst(NarrowUse->getOperand(0), WideType, in cloneArithmeticIVUser()
1071 SignExtend, NarrowUse); in cloneArithmeticIVUser()
1072 Value *RHS = (NarrowUse->getOperand(1) == NarrowDef) in cloneArithmeticIVUser()
1074 : createExtendInst(NarrowUse->getOperand(1), WideType, in cloneArithmeticIVUser()
1075 SignExtend, NarrowUse); in cloneArithmeticIVUser()
1077 auto *NarrowBO = cast<BinaryOperator>(NarrowUse); in cloneArithmeticIVUser()
1081 IRBuilder<> Builder(NarrowUse); in cloneArithmeticIVUser()
1106 const unsigned OpCode = DU.NarrowUse->getOpcode(); in getExtendedOperandRecurrence()
1115 DU.NarrowUse->getOperand(0) == DU.NarrowDef ? 1 : 0; in getExtendedOperandRecurrence()
1116 assert(DU.NarrowUse->getOperand(1-ExtendOperIdx) == DU.NarrowDef && "bad DU"); in getExtendedOperandRecurrence()
1120 cast<OverflowingBinaryOperator>(DU.NarrowUse); in getExtendedOperandRecurrence()
1123 SE->getSCEV(DU.NarrowUse->getOperand(ExtendOperIdx)), WideType); in getExtendedOperandRecurrence()
1126 SE->getSCEV(DU.NarrowUse->getOperand(ExtendOperIdx)), WideType); in getExtendedOperandRecurrence()
1154 const SCEVAddRecExpr *WidenIV::getWideRecurrence(Instruction *NarrowUse) { in getWideRecurrence() argument
1155 if (!SE->isSCEVable(NarrowUse->getType())) in getWideRecurrence()
1158 const SCEV *NarrowExpr = SE->getSCEV(NarrowUse); in getWideRecurrence()
1179 << " for user " << *DU.NarrowUse << "\n"); in truncateIVUse()
1181 getInsertPointForUses(DU.NarrowUse, DU.NarrowDef, DT, LI)); in truncateIVUse()
1183 DU.NarrowUse->replaceUsesOfWith(DU.NarrowDef, Trunc); in truncateIVUse()
1190 ICmpInst *Cmp = dyn_cast<ICmpInst>(DU.NarrowUse); in widenLoopCompare()
1219 getInsertPointForUses(DU.NarrowUse, DU.NarrowDef, DT, LI)); in widenLoopCompare()
1220 DU.NarrowUse->replaceUsesOfWith(DU.NarrowDef, DU.WideDef); in widenLoopCompare()
1225 DU.NarrowUse->replaceUsesOfWith(Op, ExtOp); in widenLoopCompare()
1235 if (PHINode *UsePhi = dyn_cast<PHINode>(DU.NarrowUse)) { in widenIVUse()
1258 if (IsSigned ? isa<SExtInst>(DU.NarrowUse) : isa<ZExtInst>(DU.NarrowUse)) { in widenIVUse()
1260 if (DU.NarrowUse->getType() != WideType) { in widenIVUse()
1261 unsigned CastWidth = SE->getTypeSizeInBits(DU.NarrowUse->getType()); in widenIVUse()
1265 IRBuilder<> Builder(DU.NarrowUse); in widenIVUse()
1266 NewDef = Builder.CreateTrunc(DU.WideDef, DU.NarrowUse->getType()); in widenIVUse()
1273 << " not wide enough to subsume " << *DU.NarrowUse << "\n"); in widenIVUse()
1274 DU.NarrowUse->replaceUsesOfWith(DU.NarrowDef, DU.WideDef); in widenIVUse()
1275 NewDef = DU.NarrowUse; in widenIVUse()
1278 if (NewDef != DU.NarrowUse) { in widenIVUse()
1279 DEBUG(dbgs() << "INDVARS: eliminating " << *DU.NarrowUse in widenIVUse()
1282 DU.NarrowUse->replaceAllUsesWith(NewDef); in widenIVUse()
1283 DeadInsts.emplace_back(DU.NarrowUse); in widenIVUse()
1296 const SCEVAddRecExpr *WideAddRec = getWideRecurrence(DU.NarrowUse); in widenIVUse()
1314 assert(DU.NarrowUse != DU.NarrowUse->getParent()->getTerminator() && in widenIVUse()
1321 && Rewriter.hoistIVInc(WideInc, DU.NarrowUse)) in widenIVUse()
1433 pushNarrowIVUsers(DU.NarrowUse, WideUse); in createWideIV()