Handle sqrt in CannotBeNegativeZero. absf and absl

appear to be misspellings, removed in favor of fabs*.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82796 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Dale Johannesen
2009-09-25 20:54:50 +00:00
parent c76909abfe
commit 9d06175a15
2 changed files with 40 additions and 3 deletions

View File

@@ -840,9 +840,13 @@ bool llvm::CannotBeNegativeZero(const Value *V, unsigned Depth) {
if (F->isDeclaration()) {
// abs(x) != -0.0
if (F->getName() == "abs") return true;
// abs[lf](x) != -0.0
if (F->getName() == "absf") return true;
if (F->getName() == "absl") return true;
// fabs[lf](x) != -0.0
if (F->getName() == "fabs") return true;
if (F->getName() == "fabsf") return true;
if (F->getName() == "fabsl") return true;
if (F->getName() == "sqrt" || F->getName() == "sqrtf" ||
F->getName() == "sqrtl")
return CannotBeNegativeZero(CI->getOperand(1), Depth+1);
}
}