aboutsummaryrefslogtreecommitdiffstats
path: root/test/CodeGen/ARM/fparith.ll
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2006-10-09 19:15:17 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2006-10-09 19:15:17 +0000
commitff7e63cf7ade2c435c133d2065b679884f7cf44e (patch)
tree2a6b00cda969d0dd68605d1c5ab2eb685d4096ea /test/CodeGen/ARM/fparith.ll
parentf2bdcb31877bf5e79903316c49b6a29376f03919 (diff)
downloadexternal_llvm-ff7e63cf7ade2c435c133d2065b679884f7cf44e.zip
external_llvm-ff7e63cf7ade2c435c133d2065b679884f7cf44e.tar.gz
external_llvm-ff7e63cf7ade2c435c133d2065b679884f7cf44e.tar.bz2
add some tests for floating point arithmetic
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30840 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/ARM/fparith.ll')
-rw-r--r--test/CodeGen/ARM/fparith.ll29
1 files changed, 29 insertions, 0 deletions
diff --git a/test/CodeGen/ARM/fparith.ll b/test/CodeGen/ARM/fparith.ll
new file mode 100644
index 0000000..abf4426
--- /dev/null
+++ b/test/CodeGen/ARM/fparith.ll
@@ -0,0 +1,29 @@
+; RUN: llvm-as < %s | llc -march=arm &&
+; RUN: llvm-as < %s | llc -march=arm | grep fadds &&
+; RUN: llvm-as < %s | llc -march=arm | grep faddd &&
+; RUN: llvm-as < %s | llc -march=arm | grep fmuls &&
+; RUN: llvm-as < %s | llc -march=arm | grep fmuld
+
+float %f(float %a, float %b) {
+entry:
+ %tmp = add float %a, %b
+ ret float %tmp
+}
+
+double %g(double %a, double %b) {
+entry:
+ %tmp = add double %a, %b
+ ret double %tmp
+}
+
+float %h(float %a, float %b) {
+entry:
+ %tmp = mul float %a, %b
+ ret float %tmp
+}
+
+double %i(double %a, double %b) {
+entry:
+ %tmp = mul double %a, %b
+ ret double %tmp
+}