[llvm] r252342 - [SimplifyLibCalls] Don't hardcode the function name.

Davide Italiano via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 6 13:05:08 PST 2015


Author: davide
Date: Fri Nov  6 15:05:07 2015
New Revision: 252342

URL: http://llvm.org/viewvc/llvm-project?rev=252342&view=rev
Log:
[SimplifyLibCalls] Don't hardcode the function name.

Modified:
    llvm/trunk/lib/Transforms/Utils/SimplifyLibCalls.cpp

Modified: llvm/trunk/lib/Transforms/Utils/SimplifyLibCalls.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Utils/SimplifyLibCalls.cpp?rev=252342&r1=252341&r2=252342&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Utils/SimplifyLibCalls.cpp (original)
+++ llvm/trunk/lib/Transforms/Utils/SimplifyLibCalls.cpp Fri Nov  6 15:05:07 2015
@@ -1093,7 +1093,8 @@ Value *LibCallSimplifier::optimizePow(Ca
     if (Op1C->isExactlyValue(2.0) &&
         hasUnaryFloatFn(TLI, Op1->getType(), LibFunc::exp2, LibFunc::exp2f,
                         LibFunc::exp2l))
-      return EmitUnaryFloatFnCall(Op2, "exp2", B, Callee->getAttributes());
+      return EmitUnaryFloatFnCall(Op2, TLI->getName(LibFunc::exp2), B,
+                                  Callee->getAttributes());
     // pow(10.0, x) -> exp10(x)
     if (Op1C->isExactlyValue(10.0) &&
         hasUnaryFloatFn(TLI, Op1->getType(), LibFunc::exp10, LibFunc::exp10f,




More information about the llvm-commits mailing list