[3/4] arc: Use accl_operand predicate for fma instructions.

Message ID 20200226145914.1358913-3-claziss@gmail.com
State New
Headers show
Series
  • [1/4] arc: Add length attribute to eh_return pattern.
Related show

Commit Message

Claudiu Zissulescu Feb. 26, 2020, 2:59 p.m.
With the refurbish of ARC600' accumulator support, the mlo_operand
doesn't reflect the proper low accumulator register for the newer
ARCv2 accumulator register used by the fma instructions, replace
it with accl_operand predicate.

gcc/
xxxx-xx-xx  Claudiu Zissulescu  <claziss@synopsys.com>

	* config/arc/arc.md (fmasf4_fpu): Use accl_operand predicate.
	(fnmasf4_fpu): Likewise.
---
 gcc/config/arc/fpu.md | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

-- 
2.24.1

Comments

Jeff Law Feb. 28, 2020, 4:57 p.m. | #1
On Wed, 2020-02-26 at 16:59 +0200, Claudiu Zissulescu wrote:
> With the refurbish of ARC600' accumulator support, the mlo_operand

> doesn't reflect the proper low accumulator register for the newer

> ARCv2 accumulator register used by the fma instructions, replace

> it with accl_operand predicate.

> 

> gcc/

> xxxx-xx-xx  Claudiu Zissulescu  <claziss@synopsys.com>

> 

> 	* config/arc/arc.md (fmasf4_fpu): Use accl_operand predicate.

> 	(fnmasf4_fpu): Likewise.

OK
jeff
>

Patch

diff --git a/gcc/config/arc/fpu.md b/gcc/config/arc/fpu.md
index 6729795de54..14ebd865206 100644
--- a/gcc/config/arc/fpu.md
+++ b/gcc/config/arc/fpu.md
@@ -89,7 +89,7 @@ 
   [(set (match_operand:SF 0 "register_operand"          "=r,r,r,r,r")
 	(fma:SF (match_operand:SF 1 "nonmemory_operand" "%0,r,0,r,F")
 		(match_operand:SF 2 "nonmemory_operand"  "r,r,F,F,r")
-		(match_operand:SF 3 "mlo_operand" "")))]
+		(match_operand:SF 3 "accl_operand" "")))]
   "TARGET_FP_SP_FUSED
    && (register_operand (operands[1], SFmode)
        || register_operand (operands[2], SFmode))"
@@ -104,7 +104,7 @@ 
   [(set (match_operand:SF 0 "register_operand"                  "=r,r,r,r,r")
 	(fma:SF (neg:SF (match_operand:SF 1 "nonmemory_operand" "%0,r,0,r,F"))
 		(match_operand:SF 2 "nonmemory_operand"          "r,r,F,F,r")
-		(match_operand:SF 3 "mlo_operand" "")))]
+		(match_operand:SF 3 "accl_operand" "")))]
   "TARGET_FP_SP_FUSED
    && (register_operand (operands[1], SFmode)
        || register_operand (operands[2], SFmode))"