Lines Matching defs:CntInst
231 void transformLoopToPopcount(BasicBlock *PreCondBB, Instruction *CntInst,
237 Instruction *CntInst);
241 Instruction *CntInst, PHINode *CntPhi,
1574 /// 1) \p CntInst is set to the instruction Counting Leading Zeros (CTLZ)
1600 Value *&InitX, Instruction *&CntInst,
1606 CntInst = nullptr;
1662 CntInst = &Inst;
1666 if (!CntInst)
1675 /// 1) \p CntInst is set to the instruction counting the population bit.
1697 Instruction *&CntInst, PHINode *&CntPhi,
1794 CntInst = CountInst;
1805 /// 1) \p CntInst is set to the instruction Counting Leading Zeros (CTLZ)
1831 Instruction *&CntInst, PHINode *&CntPhi,
1837 CntInst = nullptr;
1890 CntInst = &Inst;
1894 if (!CntInst)
1928 Instruction *CntInst) {
1936 for (User *U : CntInst->users())
1941 // If both CntInst and CntPhi are used outside the loop the profitability
1981 transformLoopToCountable(IntrinID, PH, CntInst, CntPhi, InitX, DefX,
1999 Instruction *CntInst = nullptr;
2001 if (!detectShiftUntilZeroIdiom(CurLoop, *DL, IntrinID, InitX, CntInst, CntPhi,
2005 return insertFFSIfProfitable(IntrinID, InitX, DefX, CntPhi, CntInst);
2017 Instruction *CntInst = nullptr;
2020 if (!detectShiftUntilLessThanIdiom(CurLoop, *DL, IntrinID, InitX, CntInst,
2026 return insertFFSIfProfitable(IntrinID, InitX, DefX, CntPhi, CntInst);
2067 transformLoopToCountable(IntrinID, PH, CntInst, CntPhi, InitX, DefX,
2114 Instruction *CntInst;
2117 if (!detectPopcountIdiom(CurLoop, PreCondBB, CntInst, CntPhi, Val))
2120 transformLoopToPopcount(PreCondBB, CntInst, CntPhi, Val);
2149 /// CntPhi = PHI [Cnt0, CntInst]
2151 /// CntInst = CntPhi + 1
2155 /// Use(CntPhi) or Use(CntInst)
2164 /// CntPhi = PHI [Cnt0, CntInst]
2167 /// CntInst = CntPhi + 1
2174 /// Use(Count + Cnt0) // Use(CntInst)
2177 /// If CntInst and DefX are not used in LOOP_BODY they will be removed.
2179 Intrinsic::ID IntrinID, BasicBlock *Preheader, Instruction *CntInst,
2217 NewCount = Builder.CreateZExtOrTrunc(NewCount, CntInst->getType());
2220 if (cast<ConstantInt>(CntInst->getOperand(1))->isOne()) {
2265 CntInst->replaceUsesOutsideBlock(NewCount, Body);
2273 Instruction *CntInst,
2277 const DebugLoc &DL = CntInst->getDebugLoc();
2372 CntInst->replaceUsesOutsideBlock(NewCount, Body);