diff options
author | Dale Johannesen <dalej@apple.com> | 2009-09-25 20:54:50 +0000 |
---|---|---|
committer | Dale Johannesen <dalej@apple.com> | 2009-09-25 20:54:50 +0000 |
commit | 9d06175a15a61b977ebbabd0d9cc738ebfa7870c (patch) | |
tree | b45ebe487228f15d0f8cb7e43ffab530d15f31ec /lib/Analysis/ValueTracking.cpp | |
parent | c76909abfec876c6b751d693ebd3df07df686aa0 (diff) |
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
Diffstat (limited to 'lib/Analysis/ValueTracking.cpp')
-rw-r--r-- | lib/Analysis/ValueTracking.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/Analysis/ValueTracking.cpp b/lib/Analysis/ValueTracking.cpp index 9494a2f4c5..baa347a663 100644 --- a/lib/Analysis/ValueTracking.cpp +++ b/lib/Analysis/ValueTracking.cpp @@ -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); } } |