diff options
author | Richard Sandiford <richard.sandiford@arm.com> | 2024-06-21 09:52:42 +0100 |
---|---|---|
committer | Richard Sandiford <richard.sandiford@arm.com> | 2024-06-21 09:52:42 +0100 |
commit | f49267e1636872128249431e9e5d20c0908b7e8e (patch) | |
tree | b8b76622479fd394a16fe1601ca9b213909d0bab | |
parent | fbe4dd20b9f25eaa0b6b90d008aff4708e47765b (diff) | |
download | gcc-f49267e1636872128249431e9e5d20c0908b7e8e.zip gcc-f49267e1636872128249431e9e5d20c0908b7e8e.tar.gz gcc-f49267e1636872128249431e9e5d20c0908b7e8e.tar.bz2 |
sh: Make *minus_plus_one work after RA
*minus_plus_one had no constraints, which meant that it could be
matched after RA with operands 0, 1 and 2 all being different.
The associated split instead requires operand 0 to be tied to
operand 1.
gcc/
* config/sh/sh.md (*minus_plus_one): Add constraints.
-rw-r--r-- | gcc/config/sh/sh.md | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/config/sh/sh.md b/gcc/config/sh/sh.md index 92a1efe..9491b49 100644 --- a/gcc/config/sh/sh.md +++ b/gcc/config/sh/sh.md @@ -1642,9 +1642,9 @@ ;; matched. Split this up into a simple sub add sequence, as this will save ;; us one sett insn. (define_insn_and_split "*minus_plus_one" - [(set (match_operand:SI 0 "arith_reg_dest" "") - (plus:SI (minus:SI (match_operand:SI 1 "arith_reg_operand" "") - (match_operand:SI 2 "arith_reg_operand" "")) + [(set (match_operand:SI 0 "arith_reg_dest" "=r") + (plus:SI (minus:SI (match_operand:SI 1 "arith_reg_operand" "0") + (match_operand:SI 2 "arith_reg_operand" "r")) (const_int 1)))] "TARGET_SH1" "#" |