[llvm-commits] CVS: llvm/test/Regression/Transforms/SimplifyLibCalls/Pow.ll
Reid Spencer
reid at x10sys.com
Thu Apr 28 22:47:16 PDT 2005
Changes in directory llvm/test/Regression/Transforms/SimplifyLibCalls:
Pow.ll added (r1.1)
---
Log message:
New test case for testing pow(3) math library optimizations.
---
Diffs of the changes: (+18 -0)
Pow.ll | 18 ++++++++++++++++++
1 files changed, 18 insertions(+)
Index: llvm/test/Regression/Transforms/SimplifyLibCalls/Pow.ll
diff -c /dev/null llvm/test/Regression/Transforms/SimplifyLibCalls/Pow.ll:1.1
*** /dev/null Fri Apr 29 00:47:15 2005
--- llvm/test/Regression/Transforms/SimplifyLibCalls/Pow.ll Fri Apr 29 00:47:05 2005
***************
*** 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
+ }
More information about the llvm-commits
mailing list