aboutsummaryrefslogtreecommitdiffstats
path: root/test/Transforms/SimplifyLibCalls/pow2.ll
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2008-04-09 17:48:11 +0000
committerChris Lattner <sabre@nondot.org>2008-04-09 17:48:11 +0000
commit184b84e1953d8d5853e8f553bb55918a6b03fbb0 (patch)
tree788de6d4eedf7ca1f8a6255330156f6fae7d2556 /test/Transforms/SimplifyLibCalls/pow2.ll
parent51bfba06aaa7e66fe0899428f23d83d3392a3fb8 (diff)
downloadexternal_llvm-184b84e1953d8d5853e8f553bb55918a6b03fbb0.zip
external_llvm-184b84e1953d8d5853e8f553bb55918a6b03fbb0.tar.gz
external_llvm-184b84e1953d8d5853e8f553bb55918a6b03fbb0.tar.bz2
Generalize getUnaryFloatFunction to handle any FP unary function, automatically
figuring out the suffix to use. implement pow(2,x) -> exp2(x). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49437 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms/SimplifyLibCalls/pow2.ll')
-rw-r--r--test/Transforms/SimplifyLibCalls/pow2.ll5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/Transforms/SimplifyLibCalls/pow2.ll b/test/Transforms/SimplifyLibCalls/pow2.ll
index c039d80..a48abba 100644
--- a/test/Transforms/SimplifyLibCalls/pow2.ll
+++ b/test/Transforms/SimplifyLibCalls/pow2.ll
@@ -30,3 +30,8 @@ define float @test4f(float %X) {
%Y = call float @powf( float %X, float 2.0)
ret float %Y
}
+
+define float @test5f(float %X) {
+ %Y = call float @powf(float 2.0, float %X) ;; exp2
+ ret float %Y
+}