Home | History | Annotate | Download | only in Utils

Lines Matching refs:Sqrt

1154       hasUnaryFloatFn(TLI, Op2->getType(), LibFunc::sqrt, LibFunc::sqrtf,
1159 // In -ffast-math, pow(x, 0.5) -> sqrt(x).
1161 return EmitUnaryFloatFnCall(Op1, TLI->getName(LibFunc::sqrt), B,
1164 // Expand pow(x, 0.5) to (x == -infinity ? +infinity : fabs(sqrt(x))).
1167 // TODO: In finite-only mode, this could be just fabs(sqrt(x)).
1170 Value *Sqrt = EmitUnaryFloatFnCall(Op1, "sqrt", B, Callee->getAttributes());
1172 EmitUnaryFloatFnCall(Sqrt, "fabs", B, Callee->getAttributes());
1392 if (TLI->has(LibFunc::sqrtf) && (Callee->getName() == "sqrt" ||
1393 Callee->getIntrinsicID() == Intrinsic::sqrt))
1402 // so we can do this fold: sqrt(x * x) -> fabs(x);
1403 // or this fold: sqrt(x * x * y) -> fabs(x) * sqrt(y).
1419 // Pattern: sqrt((x * y) * z)
1421 // Matched: sqrt((x * x) * z)
1428 // Fast math flags for any created instructions should match the sqrt
1430 // FIXME: We're not checking the sqrt because it doesn't have
1444 Value *Sqrt = Intrinsic::getDeclaration(M, Intrinsic::sqrt, ArgType);
1445 Value *SqrtCall = B.CreateCall(Sqrt, OtherOp, "sqrt");
2194 case Intrinsic::sqrt:
2249 case LibFunc::sqrt:
2355 // * cbrt(sqrt(x)) -> pow(x,1/6)
2365 // * log(sqrt(x)) -> 0.5*log(x)
2371 // * pow(sqrt(x),y) -> pow(x,y*0.5)
2381 // sqrt, sqrtf, sqrtl:
2382 // * sqrt(expN(x)) -> expN(x*0.5)
2383 // * sqrt(Nroot(x)) -> pow(x,1/(2*N))
2384 // * sqrt(pow(x,y)) -> pow(|x|,y*0.5)