Lines Matching refs:Pow
1968 Value *LibCallSimplifier::replacePowWithExp(CallInst *Pow, IRBuilderBase &B) { in replacePowWithExp() argument
1969 Module *M = Pow->getModule(); in replacePowWithExp()
1970 Value *Base = Pow->getArgOperand(0), *Expo = Pow->getArgOperand(1); in replacePowWithExp()
1971 Module *Mod = Pow->getModule(); in replacePowWithExp()
1972 Type *Ty = Pow->getType(); in replacePowWithExp()
1991 if (BaseFn && BaseFn->hasOneUse() && BaseFn->isFast() && Pow->isFast()) { in replacePowWithExp()
2046 if (!match(Pow->getArgOperand(0), m_APFloat(BaseF))) in replacePowWithExp()
2057 return copyFlags(*Pow, in replacePowWithExp()
2077 if (Pow->doesNotAccessMemory()) in replacePowWithExp()
2078 return copyFlags(*Pow, B.CreateCall(Intrinsic::getDeclaration( in replacePowWithExp()
2082 return copyFlags(*Pow, emitUnaryFloatFnCall(FMul, TLI, LibFunc_exp2, in replacePowWithExp()
2092 return copyFlags(*Pow, emitUnaryFloatFnCall(Expo, TLI, LibFunc_exp10, in replacePowWithExp()
2097 if (Pow->hasApproxFunc() && Pow->hasNoNaNs() && BaseF->isFiniteNonZero() && in replacePowWithExp()
2112 if (Pow->doesNotAccessMemory()) in replacePowWithExp()
2113 return copyFlags(*Pow, B.CreateCall(Intrinsic::getDeclaration( in replacePowWithExp()
2118 return copyFlags(*Pow, emitUnaryFloatFnCall(FMul, TLI, LibFunc_exp2, in replacePowWithExp()
2150 Value *LibCallSimplifier::replacePowWithSqrt(CallInst *Pow, IRBuilderBase &B) { in replacePowWithSqrt() argument
2151 Value *Sqrt, *Base = Pow->getArgOperand(0), *Expo = Pow->getArgOperand(1); in replacePowWithSqrt()
2152 Module *Mod = Pow->getModule(); in replacePowWithSqrt()
2153 Type *Ty = Pow->getType(); in replacePowWithSqrt()
2162 if (ExpoF->isNegative() && (!Pow->hasApproxFunc() && !Pow->hasAllowReassoc())) in replacePowWithSqrt()
2169 if (!Pow->doesNotAccessMemory() && !Pow->hasNoInfs() && in replacePowWithSqrt()
2170 !isKnownNeverInfinity(Base, DL, TLI, 0, AC, Pow)) in replacePowWithSqrt()
2173 Sqrt = getSqrtCall(Base, AttributeList(), Pow->doesNotAccessMemory(), Mod, B, in replacePowWithSqrt()
2179 if (!Pow->hasNoSignedZeros()) { in replacePowWithSqrt()
2184 Sqrt = copyFlags(*Pow, Sqrt); in replacePowWithSqrt()
2188 if (!Pow->hasNoInfs()) { in replacePowWithSqrt()
2210 Value *LibCallSimplifier::optimizePow(CallInst *Pow, IRBuilderBase &B) { in optimizePow() argument
2211 Value *Base = Pow->getArgOperand(0); in optimizePow()
2212 Value *Expo = Pow->getArgOperand(1); in optimizePow()
2213 Function *Callee = Pow->getCalledFunction(); in optimizePow()
2215 Type *Ty = Pow->getType(); in optimizePow()
2216 Module *M = Pow->getModule(); in optimizePow()
2217 bool AllowApprox = Pow->hasApproxFunc(); in optimizePow()
2222 B.setFastMathFlags(Pow->getFastMathFlags()); in optimizePow()
2229 if (Value *Exp = replacePowWithExp(Pow, B)) in optimizePow()
2250 if (Value *Sqrt = replacePowWithSqrt(Pow, B)) in optimizePow()
2280 Sqrt = getSqrtCall(Base, AttributeList(), Pow->doesNotAccessMemory(), M, in optimizePow()
2293 *Pow, in optimizePow()
2308 return copyFlags(*Pow, createPowWithIntegerExponent(Base, ExpoI, M, B)); in optimizePow()
2315 if (Value *Shrunk = optimizeBinaryDoubleFP(Pow, B, TLI, true)) in optimizePow()