From: Rafael Espindola Date: Tue, 17 Oct 2006 20:33:13 +0000 (+0000) Subject: add FABSS and FABSD X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=c01c87c8baa5e7dd1e11a3bacbd3b4e94ebe6c5d;p=oota-llvm.git add FABSS and FABSD git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31012 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Target/ARM/ARMInstrInfo.td b/lib/Target/ARM/ARMInstrInfo.td index 5109eea3472..f252f605cc4 100644 --- a/lib/Target/ARM/ARMInstrInfo.td +++ b/lib/Target/ARM/ARMInstrInfo.td @@ -288,6 +288,14 @@ def FNEGD : InstARM<(ops DFPRegs:$dst, DFPRegs:$src), "fnegd $dst, $src", [(set DFPRegs:$dst, (fneg DFPRegs:$src))]>; +def FABSS : InstARM<(ops FPRegs:$dst, FPRegs:$src), + "fabss $dst, $src", + [(set FPRegs:$dst, (fabs FPRegs:$src))]>; + +def FABSD : InstARM<(ops DFPRegs:$dst, DFPRegs:$src), + "fabsd $dst, $src", + [(set DFPRegs:$dst, (fabs DFPRegs:$src))]>; + def FMULS : FPBinOp<"fmuls", fmul>; def FMULD : DFPBinOp<"fmuld", fmul>; def FDIVS : FPBinOp<"fdivs", fdiv>; diff --git a/test/CodeGen/ARM/fparith.ll b/test/CodeGen/ARM/fparith.ll index f83aa771dbf..db115a95f04 100644 --- a/test/CodeGen/ARM/fparith.ll +++ b/test/CodeGen/ARM/fparith.ll @@ -67,3 +67,19 @@ entry: %tmp1 = div double %a, %b ret double %tmp1 } + +float %f11(float %a) { +entry: + %tmp1 = call float %fabsf(float %a) + ret float %tmp1 +} + +declare float %fabsf(float) + +double %f12(double %a) { +entry: + %tmp1 = call double %fabs(double %a) + ret double %tmp1 +} + +declare double %fabs(double)