From 3354fe473f508d213331ebe8d183115fefdc9bf4 Mon Sep 17 00:00:00 2001 From: David Majnemer Date: Wed, 26 Aug 2015 18:30:16 +0000 Subject: [PATCH] [SimplifyLibCalls] Fix a typo cbrt(sqrt(x)) calculates the sixth root, not the ninth root. cbrt(cbrt(x)) calculates the ninth root. llvm-svn: 246046 --- llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp b/llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp index 46b554b0341b..6bcbde756bc1 100644 --- a/llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp +++ b/llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp @@ -2202,7 +2202,7 @@ void LibCallSimplifier::replaceAllUsesWith(Instruction *I, Value *With) { // cbrt: // * cbrt(expN(X)) -> expN(x/3) // * cbrt(sqrt(x)) -> pow(x,1/6) -// * cbrt(sqrt(x)) -> pow(x,1/9) +// * cbrt(cbrt(x)) -> pow(x,1/9) // // exp, expf, expl: // * exp(log(x)) -> x