From a61a4f669bbbacb5d52c0a5f3f9f3dd7fa8319bf Mon Sep 17 00:00:00 2001 From: Anton Korobeynikov Date: Thu, 16 Jul 2009 14:23:44 +0000 Subject: [PATCH] Add LOAD NEGATIVE instruction git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76032 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/SystemZ/SystemZInstrFP.td | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/lib/Target/SystemZ/SystemZInstrFP.td b/lib/Target/SystemZ/SystemZInstrFP.td index 0c9a239972f..d259ed439f7 100644 --- a/lib/Target/SystemZ/SystemZInstrFP.td +++ b/lib/Target/SystemZ/SystemZInstrFP.td @@ -82,7 +82,6 @@ def FNEG64rr : Pseudo<(outs FP64:$dst), (ins FP64:$src), let isTwoAddress = 1 in { let Defs = [PSW] in { -// FIXME: Add peephole for fneg(fabs) => load negative def FABS32rr : Pseudo<(outs FP32:$dst), (ins FP32:$src), "lpebr\t{$dst}", @@ -93,6 +92,15 @@ def FABS64rr : Pseudo<(outs FP64:$dst), (ins FP64:$src), [(set FP64:$dst, (fabs FP64:$src)), (implicit PSW)]>; +def FNABS32rr : Pseudo<(outs FP32:$dst), (ins FP32:$src), + "lnebr\t{$dst}", + [(set FP32:$dst, (fneg(fabs FP32:$src))), + (implicit PSW)]>; +def FNABS64rr : Pseudo<(outs FP64:$dst), (ins FP64:$src), + "lndbr\t{$dst}", + [(set FP64:$dst, (fneg(fabs FP64:$src))), + (implicit PSW)]>; + let isCommutable = 1 in { // X = ADD Y, Z == X = ADD Z, Y def FADD32rr : Pseudo<(outs FP32:$dst), (ins FP32:$src1, FP32:$src2), "aebr\t{$dst, $src2}", -- 2.34.1