aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOleg Endo <olegendo@gcc.gnu.org>2016-05-31 15:27:54 +0000
committerOleg Endo <olegendo@gcc.gnu.org>2016-05-31 15:27:54 +0000
commita1443cff0d845ddcb1d114f0864e29c89e37f260 (patch)
tree6f889d7dcf2d5505df0a775f9c40dbdb090abda8
parent0e07cb7f7d43282f601820a149eec66ea99a541f (diff)
downloadgcc-a1443cff0d845ddcb1d114f0864e29c89e37f260.zip
gcc-a1443cff0d845ddcb1d114f0864e29c89e37f260.tar.gz
gcc-a1443cff0d845ddcb1d114f0864e29c89e37f260.tar.bz2
Simplify SH DImode add, sub, neg patterns.
* config/sh/sh.md (adddi3, subdi3, negdi2, abs<mode>2): Remove define_expand patterns. (adddi3_compact): Rename to adddi3. (subdi3_compact): Rename to subdi3. (*negdi2): Rename to negdi2. (*abs<mode>2): Rename to abs<mode>2. From-SVN: r236927
-rw-r--r--gcc/ChangeLog9
-rw-r--r--gcc/config/sh/sh.md44
2 files changed, 14 insertions, 39 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index bdc3d17..dca3e9c 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,14 @@
2016-05-31 Oleg Endo <olegendo@gcc.gnu.org>
+ * config/sh/sh.md (adddi3, subdi3, negdi2, abs<mode>2): Remove
+ define_expand patterns.
+ (adddi3_compact): Rename to adddi3.
+ (subdi3_compact): Rename to subdi3.
+ (*negdi2): Rename to negdi2.
+ (*abs<mode>2): Rename to abs<mode>2.
+
+2016-05-31 Oleg Endo <olegendo@gcc.gnu.org>
+
* config/rx/rx.md (FETCHOP_NO_MINUS): New code iterator.
(atomic_<fetchop_name>_fetchsi): Extract minus operator into ...
(atomic_sub_fetchsi): ... this new pattern.
diff --git a/gcc/config/sh/sh.md b/gcc/config/sh/sh.md
index 406721d..30948ca 100644
--- a/gcc/config/sh/sh.md
+++ b/gcc/config/sh/sh.md
@@ -1535,18 +1535,7 @@
;; Addition instructions
;; -------------------------------------------------------------------------
-(define_expand "adddi3"
- [(set (match_operand:DI 0 "arith_reg_operand")
- (plus:DI (match_operand:DI 1 "arith_reg_operand")
- (match_operand:DI 2 "arith_operand")))]
- ""
-{
- operands[2] = force_reg (DImode, operands[2]);
- emit_insn (gen_adddi3_compact (operands[0], operands[1], operands[2]));
- DONE;
-})
-
-(define_insn_and_split "adddi3_compact"
+(define_insn_and_split "adddi3"
[(set (match_operand:DI 0 "arith_reg_dest")
(plus:DI (match_operand:DI 1 "arith_reg_operand")
(match_operand:DI 2 "arith_reg_operand")))
@@ -1938,21 +1927,10 @@
;; Subtraction instructions
;; -------------------------------------------------------------------------
-(define_expand "subdi3"
- [(set (match_operand:DI 0 "arith_reg_operand" "")
- (minus:DI (match_operand:DI 1 "arith_reg_or_0_operand" "")
- (match_operand:DI 2 "arith_reg_operand" "")))]
- ""
-{
- operands[1] = force_reg (DImode, operands[1]);
- emit_insn (gen_subdi3_compact (operands[0], operands[1], operands[2]));
- DONE;
-})
-
-(define_insn_and_split "subdi3_compact"
+(define_insn_and_split "subdi3"
[(set (match_operand:DI 0 "arith_reg_dest")
(minus:DI (match_operand:DI 1 "arith_reg_operand")
- (match_operand:DI 2 "arith_reg_operand")))
+ (match_operand:DI 2 "arith_reg_operand")))
(clobber (reg:SI T_REG))]
"TARGET_SH1"
"#"
@@ -4393,13 +4371,7 @@
;; Don't split into individual negc insns immediately so that neg:DI (abs:DI)
;; can be combined.
-(define_expand "negdi2"
- [(parallel [(set (match_operand:DI 0 "arith_reg_dest")
- (neg:DI (match_operand:DI 1 "arith_reg_operand")))
- (clobber (reg:SI T_REG))])]
- "TARGET_SH1")
-
-(define_insn_and_split "*negdi2"
+(define_insn_and_split "negdi2"
[(set (match_operand:DI 0 "arith_reg_dest")
(neg:DI (match_operand:DI 1 "arith_reg_operand")))
(clobber (reg:SI T_REG))]
@@ -4480,13 +4452,7 @@
}
[(set_attr "type" "arith")])
-(define_expand "abs<mode>2"
- [(parallel [(set (match_operand:SIDI 0 "arith_reg_dest")
- (abs:SIDI (match_operand:SIDI 1 "arith_reg_operand")))
- (clobber (reg:SI T_REG))])]
- "TARGET_SH1")
-
-(define_insn_and_split "*abs<mode>2"
+(define_insn_and_split "abs<mode>2"
[(set (match_operand:SIDI 0 "arith_reg_dest")
(abs:SIDI (match_operand:SIDI 1 "arith_reg_operand")))
(clobber (reg:SI T_REG))]