add FNEGS and FNEGD

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30932 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Rafael Espindola 2006-10-13 17:37:35 +00:00
parent 0eff5ad3db
commit 33d06bcfd4
2 changed files with 23 additions and 1 deletions

View File

@ -269,6 +269,14 @@ def FSUBD : InstARM<(ops DFPRegs:$dst, DFPRegs:$a, DFPRegs:$b),
"fsubd $dst, $a, $b",
[(set DFPRegs:$dst, (fsub DFPRegs:$a, DFPRegs:$b))]>;
def FNEGS : InstARM<(ops FPRegs:$dst, FPRegs:$src),
"fnegs $dst, $src",
[(set FPRegs:$dst, (fneg FPRegs:$src))]>;
def FNEGD : InstARM<(ops DFPRegs:$dst, DFPRegs:$src),
"fnegd $dst, $src",
[(set DFPRegs:$dst, (fneg DFPRegs:$src))]>;
def FMULS : InstARM<(ops FPRegs:$dst, FPRegs:$a, FPRegs:$b),
"fmuls $dst, $a, $b",
[(set FPRegs:$dst, (fmul FPRegs:$a, FPRegs:$b))]>;

View File

@ -2,7 +2,9 @@
; 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
; 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
float %f1(float %a, float %b) {
entry:
@ -39,3 +41,15 @@ entry:
%tmp = sub double %a, %b
ret double %tmp
}
float %f7(float %a) {
entry:
%tmp1 = sub float -0.000000e+00, %a
ret float %tmp1
}
double %f8(double %a) {
entry:
%tmp1 = sub double -0.000000e+00, %a
ret double %tmp1
}