aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 0000000000..abf4426f1c
--- /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
+}