Lines Matching defs:DefX

237                              Instruction *DefX, PHINode *CntPhi,
243 Value *Var, Instruction *DefX,
1558 static PHINode *getRecurrenceVar(Value *VarX, Instruction *DefX,
1562 (PhiX->getOperand(0) == DefX || PhiX->getOperand(1) == DefX))
1575 /// 4) \p DefX is set to the instruction calculating Loop exit condition.
1590 /// x.next = x >> 1; // DefX
1597 PHINode *&CntPhi, Instruction *&DefX,
1601 DefX = nullptr;
1610 DefX = dyn_cast<Instruction>(T);
1615 if (!DefX || !isa<PHINode>(DefX))
1618 PHINode *VarPhi = cast<PHINode>(DefX);
1623 DefX = dyn_cast<Instruction>(VarPhi->getIncomingValue(Idx));
1624 if (!DefX || DefX->getNumOperands() == 0 || DefX->getOperand(0) != VarPhi)
1628 if (DefX->getOpcode() != Instruction::LShr)
1632 ConstantInt *Shft = dyn_cast<ConstantInt>(DefX->getOperand(1));
1806 /// 4) \p DefX is set to the instruction calculating Loop exit condition.
1819 /// x.next = x >> 1; // DefX
1828 Instruction *&DefX) {
1832 DefX = nullptr;
1840 DefX = dyn_cast<Instruction>(T);
1845 if (!DefX || !DefX->isShift())
1847 IntrinID = DefX->getOpcode() == Instruction::Shl ? Intrinsic::cttz :
1849 ConstantInt *Shft = dyn_cast<ConstantInt>(DefX->getOperand(1));
1852 VarX = DefX->getOperand(0);
1855 PHINode *PhiX = getRecurrenceVar(VarX, DefX, LoopEntry);
1863 if (DefX->getOpcode() == Instruction::AShr && !isKnownNonNegative(InitX, DL))
1922 Value *InitX, Instruction *DefX,
1977 transformLoopToCountable(IntrinID, PH, CntInst, CntPhi, InitX, DefX,
1978 DefX->getDebugLoc(), ZeroCheck,
1993 Instruction *DefX = nullptr;
1998 DefX))
2001 return insertFFSIfProfitable(IntrinID, InitX, DefX, CntPhi, CntInst);
2011 Instruction *DefX = nullptr;
2017 CntPhi, DefX, LoopThreshold))
2022 return insertFFSIfProfitable(IntrinID, InitX, DefX, CntPhi, CntInst);
2063 transformLoopToCountable(IntrinID, PH, CntInst, CntPhi, InitX, DefX,
2064 DefX->getDebugLoc(), ZeroCheck,
2150 /// PhiX = PHI [InitX, DefX]
2152 /// DefX = PhiX >> 1
2154 /// Br: loop if (DefX != 0)
2165 /// PhiX = PHI [InitX, DefX]
2168 /// DefX = PhiX >> 1
2177 /// If CntInst and DefX are not used in LOOP_BODY they will be removed.
2180 PHINode *CntPhi, Value *InitX, Instruction *DefX, const DebugLoc &DL,
2196 if (DefX->getOpcode() == Instruction::AShr)
2198 else if (DefX->getOpcode() == Instruction::LShr)
2200 else if (DefX->getOpcode() == Instruction::Shl) // cttz