From 667c349febc16ec921093baedadeeab8488dbe26 Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Tue, 10 Oct 2006 19:35:01 +0000 Subject: [PATCH] add fp sub git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30859 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/ARM/ARMInstrInfo.td | 8 ++++++++ test/CodeGen/ARM/fparith.ll | 20 ++++++++++++++++---- 2 files changed, 24 insertions(+), 4 deletions(-) diff --git a/lib/Target/ARM/ARMInstrInfo.td b/lib/Target/ARM/ARMInstrInfo.td index 13153dedc3e..59657743406 100644 --- a/lib/Target/ARM/ARMInstrInfo.td +++ b/lib/Target/ARM/ARMInstrInfo.td @@ -235,6 +235,14 @@ def FADDD : InstARM<(ops DFPRegs:$dst, DFPRegs:$a, DFPRegs:$b), "faddd $dst, $a, $b", [(set DFPRegs:$dst, (fadd DFPRegs:$a, DFPRegs:$b))]>; +def FSUBS : InstARM<(ops FPRegs:$dst, FPRegs:$a, FPRegs:$b), + "fsubs $dst, $a, $b", + [(set FPRegs:$dst, (fsub FPRegs:$a, FPRegs:$b))]>; + +def FSUBD : InstARM<(ops DFPRegs:$dst, DFPRegs:$a, DFPRegs:$b), + "fsubd $dst, $a, $b", + [(set DFPRegs:$dst, (fsub DFPRegs:$a, DFPRegs:$b))]>; + def FMULS : InstARM<(ops FPRegs:$dst, FPRegs:$a, FPRegs:$b), "fmuls $dst, $a, $b", [(set FPRegs:$dst, (fmul FPRegs:$a, FPRegs:$b))]>; diff --git a/test/CodeGen/ARM/fparith.ll b/test/CodeGen/ARM/fparith.ll index abf4426f1c5..7210eee9ddd 100644 --- a/test/CodeGen/ARM/fparith.ll +++ b/test/CodeGen/ARM/fparith.ll @@ -4,26 +4,38 @@ ; RUN: llvm-as < %s | llc -march=arm | grep fmuls && ; RUN: llvm-as < %s | llc -march=arm | grep fmuld -float %f(float %a, float %b) { +float %f1(float %a, float %b) { entry: %tmp = add float %a, %b ret float %tmp } -double %g(double %a, double %b) { +double %f2(double %a, double %b) { entry: %tmp = add double %a, %b ret double %tmp } -float %h(float %a, float %b) { +float %f3(float %a, float %b) { entry: %tmp = mul float %a, %b ret float %tmp } -double %i(double %a, double %b) { +double %f4(double %a, double %b) { entry: %tmp = mul double %a, %b ret double %tmp } + +float %f5(float %a, float %b) { +entry: + %tmp = sub float %a, %b + ret float %tmp +} + +double %f6(double %a, double %b) { +entry: + %tmp = sub double %a, %b + ret double %tmp +} -- 2.34.1