aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2006-10-16 21:50:04 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2006-10-16 21:50:04 +0000
commita605be69c3127a811793bcc0cbc65e9df79321ca (patch)
tree88d08e477ff3d8ac7c8cff3b1ae39f116c5c4a37
parent0505be03adf561afbd8307516125da10dba8f0c4 (diff)
downloadexternal_llvm-a605be69c3127a811793bcc0cbc65e9df79321ca.zip
external_llvm-a605be69c3127a811793bcc0cbc65e9df79321ca.tar.gz
external_llvm-a605be69c3127a811793bcc0cbc65e9df79321ca.tar.bz2
add fdivs e fdivd
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30988 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Target/ARM/ARMInstrInfo.td3
-rw-r--r--test/CodeGen/ARM/fparith.ll16
2 files changed, 17 insertions, 2 deletions
diff --git a/lib/Target/ARM/ARMInstrInfo.td b/lib/Target/ARM/ARMInstrInfo.td
index ca3d1c2..099b499 100644
--- a/lib/Target/ARM/ARMInstrInfo.td
+++ b/lib/Target/ARM/ARMInstrInfo.td
@@ -276,7 +276,8 @@ def FNEGD : InstARM<(ops DFPRegs:$dst, DFPRegs:$src),
def FMULS : FPBinOp<"fmuls", fmul>;
def FMULD : DFPBinOp<"fmuld", fmul>;
-
+def FDIVS : FPBinOp<"fdivs", fdiv>;
+def FDIVD : DFPBinOp<"fdivd", fdiv>;
// Floating Point Load
def FLDS : InstARM<(ops FPRegs:$dst, IntRegs:$addr),
diff --git a/test/CodeGen/ARM/fparith.ll b/test/CodeGen/ARM/fparith.ll
index c72a873..f83aa77 100644
--- a/test/CodeGen/ARM/fparith.ll
+++ b/test/CodeGen/ARM/fparith.ll
@@ -4,7 +4,9 @@
; RUN: llvm-as < %s | llc -march=arm | grep fmuls &&
; RUN: llvm-as < %s | llc -march=arm | grep fmuld &&
; RUN: llvm-as < %s | llc -march=arm | grep fnegs &&
-; RUN: llvm-as < %s | llc -march=arm | grep fnegd
+; RUN: llvm-as < %s | llc -march=arm | grep fnegd &&
+; RUN: llvm-as < %s | llc -march=arm | grep fdivs &&
+; RUN: llvm-as < %s | llc -march=arm | grep fdivd
float %f1(float %a, float %b) {
entry:
@@ -53,3 +55,15 @@ entry:
%tmp1 = sub double -0.000000e+00, %a
ret double %tmp1
}
+
+float %f9(float %a, float %b) {
+entry:
+ %tmp1 = div float %a, %b
+ ret float %tmp1
+}
+
+double %f10(double %a, double %b) {
+entry:
+ %tmp1 = div double %a, %b
+ ret double %tmp1
+}