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 | a8b889490ec05c69ed44b155fdae01096052d2ef (patch) | |
| tree | ca72c044bee7c8cb32ff98b944073adb8089e5a9 /llvm/test/Regression/Transforms/SimplifyLibCalls | |
| parent | 4bc952f703063b7d6c819a92ab64c65610e88a3e (diff) | |
| download | bcm5719-llvm-a8b889490ec05c69ed44b155fdae01096052d2ef.tar.gz bcm5719-llvm-a8b889490ec05c69ed44b155fdae01096052d2ef.zip | |
New test case for testing pow(3) math library optimizations.
llvm-svn: 21613
Diffstat (limited to 'llvm/test/Regression/Transforms/SimplifyLibCalls')
| -rw-r--r-- | llvm/test/Regression/Transforms/SimplifyLibCalls/Pow.ll | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/llvm/test/Regression/Transforms/SimplifyLibCalls/Pow.ll b/llvm/test/Regression/Transforms/SimplifyLibCalls/Pow.ll new file mode 100644 index 00000000000..c6d4b0f594e --- /dev/null +++ b/llvm/test/Regression/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 +} |

