Lines Matching defs:DefX
236 Instruction *DefX, PHINode *CntPhi,
242 Value *Var, Instruction *DefX,
1562 static PHINode *getRecurrenceVar(Value *VarX, Instruction *DefX,
1566 (PhiX->getOperand(0) == DefX || PhiX->getOperand(1) == DefX))
1579 /// 4) \p DefX is set to the instruction calculating Loop exit condition.
1594 /// x.next = x >> 1; // DefX
1601 PHINode *&CntPhi, Instruction *&DefX,
1605 DefX = nullptr;
1614 DefX = dyn_cast<Instruction>(T);
1619 if (!DefX || !isa<PHINode>(DefX))
1622 PHINode *VarPhi = cast<PHINode>(DefX);
1627 DefX = dyn_cast<Instruction>(VarPhi->getIncomingValue(Idx));
1628 if (!DefX || DefX->getNumOperands() == 0 || DefX->getOperand(0) != VarPhi)
1632 if (DefX->getOpcode() != Instruction::LShr)
1636 ConstantInt *Shft = dyn_cast<ConstantInt>(DefX->getOperand(1));
1810 /// 4) \p DefX is set to the instruction calculating Loop exit condition.
1823 /// x.next = x >> 1; // DefX
1832 Instruction *&DefX) {
1836 DefX = nullptr;
1844 DefX = dyn_cast<Instruction>(T);
1849 if (!DefX || !DefX->isShift())
1851 IntrinID = DefX->getOpcode() == Instruction::Shl ? Intrinsic::cttz :
1853 ConstantInt *Shft = dyn_cast<ConstantInt>(DefX->getOperand(1));
1856 VarX = DefX->getOperand(0);
1859 PHINode *PhiX = getRecurrenceVar(VarX, DefX, LoopEntry);
1867 if (DefX->getOpcode() == Instruction::AShr && !isKnownNonNegative(InitX, DL))
1926 Value *InitX, Instruction *DefX,
1981 transformLoopToCountable(IntrinID, PH, CntInst, CntPhi, InitX, DefX,
1982 DefX->getDebugLoc(), ZeroCheck,
1997 Instruction *DefX = nullptr;
2002 DefX))
2005 return insertFFSIfProfitable(IntrinID, InitX, DefX, CntPhi, CntInst);
2015 Instruction *DefX = nullptr;
2021 CntPhi, DefX, LoopThreshold))
2026 return insertFFSIfProfitable(IntrinID, InitX, DefX, CntPhi, CntInst);
2067 transformLoopToCountable(IntrinID, PH, CntInst, CntPhi, InitX, DefX,
2068 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