diff options
author | Reid Spencer <rspencer@reidspencer.com> | 2005-04-29 05:47:05 +0000 |
---|---|---|
committer | Reid Spencer <rspencer@reidspencer.com> | 2005-04-29 05:47:05 +0000 |
commit | 0f4a891803a2957ae138a8f830695203c8c3978e (patch) | |
tree | 9ecd6a909d2bc144550c6cc3775c1bd4cd6cad8a | |
parent | 5882b92360e460176380e0afe7d9913b5b7a16a3 (diff) |
New test case for testing pow(3) math library optimizations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21613 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | test/Transforms/SimplifyLibCalls/Pow.ll | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/test/Transforms/SimplifyLibCalls/Pow.ll b/test/Transforms/SimplifyLibCalls/Pow.ll new file mode 100644 index 0000000000..c6d4b0f594 --- /dev/null +++ b/test/Transforms/SimplifyLibCalls/Pow.ll @@ -0,0 +1,18 @@ +; Test that the StrCatOptimizer works correctly +; RUN: llvm-as < %s | opt -simplify-libcalls | llvm-dis | not grep 'pow' + +declare double %pow(double,double) +%fpstorage = global double 5.0 + +implementation ; Functions: + +int %main () { + %fpnum = load double* %fpstorage; + %one = call double %pow(double 1.0, double %fpnum) + %two = call double %pow(double %one, double 0.5) + %three = call double %pow(double %two, double 1.0) + %four = call double %pow(double %three, double -1.0) + %five = call double %pow(double %four, double 0.0) + %result = cast double %five to int + ret int %result +} |