arc: Improve/add instruction patterns to better use MAC instructions.
authorClaudiu Zissulescu <claziss@synopsys.com>
Mon, 9 Nov 2020 15:34:13 +0000 (17:34 +0200)
committerClaudiu Zissulescu <claziss@synopsys.com>
Mon, 9 Nov 2020 15:42:00 +0000 (17:42 +0200)
commitc5395d88dfa2123ca5155008c8c8339ded98fd32
tree83d0dedc2bf2507dbc130b008a6594fab0510128
parentb5cff0db6e3a733e470ffc36a3e14c55465bdca2
arc: Improve/add instruction patterns to better use MAC instructions.

ARC MYP7+ instructions adds MAC instructions for either vector and
scalar data types. This patch adds a madd pattern for 16it datum using
the 32bit MAC instruction, and dot_prod patterns for v4hi vector
types. The 64bit moves are also upgraded by using vadd2 instuction.

2020-11-09  Claudiu Zissulescu  <claziss@synopsys.com>

gcc/

* config/arc/arc.c (arc_split_move): Recognize vadd2 instructions.
* config/arc/arc.md (movdi_insn): Update pattern to use vadd2
instructions.
(movdf_insn): Likewise.
(maddhisi4): New pattern.
(umaddhisi4): Likewise.
* config/arc/simdext.md (mov<mode>_int): Update pattern to use
vadd2.
(sdot_prodv4hi): New pattern.
(udot_prodv4hi): Likewise.
(arc_vec_<V_US>mac_hi_v4hi): Update/renamed to
arc_vec_<V_US>mac_v2hiv2si.
(arc_vec_<V_US>mac_v2hiv2si_zero): New pattern.
* config/arc/constraints.md (Ral): Accumulator register
constraint.

Signed-off-by: Claudiu Zissulescu <claziss@synopsys.com>
gcc/config/arc/arc.c
gcc/config/arc/arc.md
gcc/config/arc/constraints.md
gcc/config/arc/simdext.md