Skip to content
This repository has been archived by the owner on May 7, 2024. It is now read-only.

Commit

Permalink
[move support] add move support for v2hi in rv64p
Browse files Browse the repository at this point in the history
  • Loading branch information
linsinan1995 committed May 16, 2021
1 parent 9ce44f8 commit bd7f477
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions gcc/config/riscv/rvp.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@
(define_mode_iterator VECI [(V4QI "!TARGET_64BIT") (V2HI "!TARGET_64BIT")
(V8QI "TARGET_64BIT") (V4HI "TARGET_64BIT")
(V2SI "TARGET_64BIT")])
;; v2hi is also used in rv64p
(define_mode_iterator VPMOVE [(V4QI "!TARGET_64BIT") (V2HI "")
(V8QI "TARGET_64BIT") (V4HI "TARGET_64BIT")])
(define_mode_iterator VQIHI [(V4QI "!TARGET_64BIT") (V2HI "!TARGET_64BIT")
(V8QI "TARGET_64BIT") (V4HI "TARGET_64BIT")])
(define_mode_iterator VSHI [(V2HI "!TARGET_64BIT") (V2SI "TARGET_64BIT")])
Expand Down Expand Up @@ -7092,17 +7095,17 @@

;; move pattern
(define_expand "mov<mode>"
[(set (match_operand:VQIHI 0 "")
(match_operand:VQIHI 1 ""))]
[(set (match_operand:VPMOVE 0 "")
(match_operand:VPMOVE 1 ""))]
"TARGET_ZPN"
{
if (riscv_legitimize_move (<MODE>mode, operands[0], operands[1]))
DONE;
})

(define_insn "*mov<mode>_internal"
[(set (match_operand:VQIHI 0 "nonimmediate_operand" "=r,r,r, m, *f,*f,*r,*m")
(match_operand:VQIHI 1 "move_operand" " r,T,m,rJ,*r*J,*m,*f,*f"))]
[(set (match_operand:VPMOVE 0 "nonimmediate_operand" "=r,r,r, m, *f,*f,*r,*m")
(match_operand:VPMOVE 1 "move_operand" " r,T,m,rJ,*r*J,*m,*f,*f"))]
"(register_operand (operands[0], <MODE>mode)
|| reg_or_0_operand (operands[1], <MODE>mode))
&& TARGET_ZPN "
Expand Down

0 comments on commit bd7f477

Please sign in to comment.