Lines Matching refs:Pow
1745 Value *LibCallSimplifier::replacePowWithExp(CallInst *Pow, IRBuilderBase &B) { in replacePowWithExp() argument
1746 Module *M = Pow->getModule(); in replacePowWithExp()
1747 Value *Base = Pow->getArgOperand(0), *Expo = Pow->getArgOperand(1); in replacePowWithExp()
1749 Module *Mod = Pow->getModule(); in replacePowWithExp()
1750 Type *Ty = Pow->getType(); in replacePowWithExp()
1769 if (BaseFn && BaseFn->hasOneUse() && BaseFn->isFast() && Pow->isFast()) { in replacePowWithExp()
1821 if (!match(Pow->getArgOperand(0), m_APFloat(BaseF))) in replacePowWithExp()
1829 return copyFlags(*Pow, in replacePowWithExp()
1849 if (Pow->doesNotAccessMemory()) in replacePowWithExp()
1850 return copyFlags(*Pow, B.CreateCall(Intrinsic::getDeclaration( in replacePowWithExp()
1854 return copyFlags(*Pow, emitUnaryFloatFnCall(FMul, TLI, LibFunc_exp2, in replacePowWithExp()
1864 return copyFlags(*Pow, emitUnaryFloatFnCall(Expo, TLI, LibFunc_exp10, in replacePowWithExp()
1869 if (Pow->hasApproxFunc() && Pow->hasNoNaNs() && BaseF->isFiniteNonZero() && in replacePowWithExp()
1884 if (Pow->doesNotAccessMemory()) in replacePowWithExp()
1885 return copyFlags(*Pow, B.CreateCall(Intrinsic::getDeclaration( in replacePowWithExp()
1890 return copyFlags(*Pow, emitUnaryFloatFnCall(FMul, TLI, LibFunc_exp2, in replacePowWithExp()
1922 Value *LibCallSimplifier::replacePowWithSqrt(CallInst *Pow, IRBuilderBase &B) { in replacePowWithSqrt() argument
1923 Value *Sqrt, *Base = Pow->getArgOperand(0), *Expo = Pow->getArgOperand(1); in replacePowWithSqrt()
1925 Module *Mod = Pow->getModule(); in replacePowWithSqrt()
1926 Type *Ty = Pow->getType(); in replacePowWithSqrt()
1935 if (ExpoF->isNegative() && (!Pow->hasApproxFunc() && !Pow->hasAllowReassoc())) in replacePowWithSqrt()
1942 if (!Pow->doesNotAccessMemory() && !Pow->hasNoInfs() && in replacePowWithSqrt()
1946 Sqrt = getSqrtCall(Base, Attrs, Pow->doesNotAccessMemory(), Mod, B, TLI); in replacePowWithSqrt()
1951 if (!Pow->hasNoSignedZeros()) { in replacePowWithSqrt()
1956 Sqrt = copyFlags(*Pow, Sqrt); in replacePowWithSqrt()
1960 if (!Pow->hasNoInfs()) { in replacePowWithSqrt()
1982 Value *LibCallSimplifier::optimizePow(CallInst *Pow, IRBuilderBase &B) { in optimizePow() argument
1983 Value *Base = Pow->getArgOperand(0); in optimizePow()
1984 Value *Expo = Pow->getArgOperand(1); in optimizePow()
1985 Function *Callee = Pow->getCalledFunction(); in optimizePow()
1987 Type *Ty = Pow->getType(); in optimizePow()
1988 Module *M = Pow->getModule(); in optimizePow()
1989 bool AllowApprox = Pow->hasApproxFunc(); in optimizePow()
1994 B.setFastMathFlags(Pow->getFastMathFlags()); in optimizePow()
2001 if (Value *Exp = replacePowWithExp(Pow, B)) in optimizePow()
2022 if (Value *Sqrt = replacePowWithSqrt(Pow, B)) in optimizePow()
2052 Sqrt = getSqrtCall(Base, Pow->getCalledFunction()->getAttributes(), in optimizePow()
2053 Pow->doesNotAccessMemory(), M, B, TLI); in optimizePow()
2065 *Pow, in optimizePow()
2080 return copyFlags(*Pow, createPowWithIntegerExponent(Base, ExpoI, M, B)); in optimizePow()
2087 if (Value *Shrunk = optimizeBinaryDoubleFP(Pow, B, TLI, true)) in optimizePow()