Lines Matching defs:CntInst
232 void transformLoopToPopcount(BasicBlock *PreCondBB, Instruction *CntInst,
238 Instruction *CntInst);
242 Instruction *CntInst, PHINode *CntPhi,
1570 /// 1) \p CntInst is set to the instruction Counting Leading Zeros (CTLZ)
1596 Value *&InitX, Instruction *&CntInst,
1602 CntInst = nullptr;
1658 CntInst = &Inst;
1662 if (!CntInst)
1671 /// 1) \p CntInst is set to the instruction counting the population bit.
1693 Instruction *&CntInst, PHINode *&CntPhi,
1790 CntInst = CountInst;
1801 /// 1) \p CntInst is set to the instruction Counting Leading Zeros (CTLZ)
1827 Instruction *&CntInst, PHINode *&CntPhi,
1833 CntInst = nullptr;
1886 CntInst = &Inst;
1890 if (!CntInst)
1924 Instruction *CntInst) {
1932 for (User *U : CntInst->users())
1937 // If both CntInst and CntPhi are used outside the loop the profitability
1977 transformLoopToCountable(IntrinID, PH, CntInst, CntPhi, InitX, DefX,
1995 Instruction *CntInst = nullptr;
1997 if (!detectShiftUntilZeroIdiom(CurLoop, *DL, IntrinID, InitX, CntInst, CntPhi,
2001 return insertFFSIfProfitable(IntrinID, InitX, DefX, CntPhi, CntInst);
2013 Instruction *CntInst = nullptr;
2016 if (!detectShiftUntilLessThanIdiom(CurLoop, *DL, IntrinID, InitX, CntInst,
2022 return insertFFSIfProfitable(IntrinID, InitX, DefX, CntPhi, CntInst);
2063 transformLoopToCountable(IntrinID, PH, CntInst, CntPhi, InitX, DefX,
2110 Instruction *CntInst;
2113 if (!detectPopcountIdiom(CurLoop, PreCondBB, CntInst, CntPhi, Val))
2116 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);