From 19386a3e5a82a8b136855783a24ac033632aadc3 Mon Sep 17 00:00:00 2001 From: Jeff Law Date: Wed, 6 Jan 1993 12:41:32 -0700 Subject: [PATCH] pa.md (fmpyadd peepholes): Cleanups suggested by Tege. From-SVN: r3125 --- gcc/config/pa/pa.md | 28 ++++++++++++++++++++++++---- 1 file changed, 24 insertions(+), 4 deletions(-) diff --git a/gcc/config/pa/pa.md b/gcc/config/pa/pa.md index 27296822a06..e48ca3c4436 100644 --- a/gcc/config/pa/pa.md +++ b/gcc/config/pa/pa.md @@ -2651,9 +2651,19 @@ "* { if (GET_MODE (operands[0]) == DFmode) - return \"fmpyadd,dbl %1,%2,%0,%4,%3\"; + { + if (rtx_equal_p (operands[5], operands[3]) + return \"fmpyadd,dbl %1,%2,%0,%4,%3\"; + else + return \"fmpyadd,dbl %1,%2,%0,%5,%3\"; + } else - return \"fmpyadd,sgl %1,%2,%0,%4,%3\"; + { + if (rtx_equal_p (operands[5], operands[3]) + return \"fmpyadd,sgl %1,%2,%0,%4,%3\"; + else + return \"fmpyadd,sgl %1,%2,%0,%5,%3\"; + } }") @@ -2668,9 +2678,19 @@ "* { if (GET_MODE (operands[0]) == DFmode) - return \"fmpyadd,dbl %1,%2,%0,%4,%3\"; + { + if (rtx_equal_p (operands[3], operands[5])) + return \"fmpyadd,dbl %1,%2,%0,%4,%3\"; + else + return \"fmpyadd,dbl %1,%2,%0,%5,%3\"; + } else - return \"fmpyadd,sgl %1,%2,%0,%4,%3\"; + { + if (rtx_equal_p (operands[3], operands[5])) + return \"fmpyadd,sgl %1,%2,%0,%4,%3\"; + else + return \"fmpyadd,sgl %1,%2,%0,%5,%3\"; + } }") ;; Note fsub subtracts the second operand from the first while fmpysub -- 2.30.2