summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorolegendo <olegendo@138bc75d-0d04-0410-961f-82ee72b054a4>2013-11-06 20:35:55 +0000
committerolegendo <olegendo@138bc75d-0d04-0410-961f-82ee72b054a4>2013-11-06 20:35:55 +0000
commit7a2d281165994048410541d263d4eafcd66e4f04 (patch)
tree10449ca113e54c02adc14cfb463dd033087a2d3f
parent5bbb752620f31485a5207bdfc7100fcabb5643a0 (diff)
downloadppe42-gcc-7a2d281165994048410541d263d4eafcd66e4f04.tar.gz
ppe42-gcc-7a2d281165994048410541d263d4eafcd66e4f04.zip
* config/sh/sh.md (adddi3): Remove empty constraints.
Remove can_create_pseudo_p and arith_reg_operand check. (adddi3_compact, subdi3_compact, *negdi2): Remove constraints. Split before reload. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@204477 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/config/sh/sh.md58
2 files changed, 35 insertions, 30 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 43ebbdad621..d57f491bc00 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,10 @@
+2013-11-06 Oleg Endo <olegendo@gcc.gnu.org>
+
+ * config/sh/sh.md (adddi3): Remove empty constraints.
+ Remove can_create_pseudo_p and arith_reg_operand check.
+ (adddi3_compact, subdi3_compact, *negdi2): Remove constraints.
+ Split before reload.
+
2013-11-06 Jeff Law <law@redhat.com>
Tom Tromey <tromey@redhat.com>
diff --git a/gcc/config/sh/sh.md b/gcc/config/sh/sh.md
index 1dd288c4833..bafb5822794 100644
--- a/gcc/config/sh/sh.md
+++ b/gcc/config/sh/sh.md
@@ -1750,15 +1750,13 @@
;; -------------------------------------------------------------------------
(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" "")))]
+ [(set (match_operand:DI 0 "arith_reg_operand")
+ (plus:DI (match_operand:DI 1 "arith_reg_operand")
+ (match_operand:DI 2 "arith_operand")))]
""
{
if (TARGET_SH1)
{
- if (!can_create_pseudo_p () && ! arith_reg_operand (operands[2], DImode))
- FAIL;
operands[2] = force_reg (DImode, operands[2]);
emit_insn (gen_adddi3_compact (operands[0], operands[1], operands[2]));
DONE;
@@ -1797,22 +1795,22 @@
(set_attr "highpart" "ignore")])
(define_insn_and_split "adddi3_compact"
- [(set (match_operand:DI 0 "arith_reg_dest" "=&r")
- (plus:DI (match_operand:DI 1 "arith_reg_operand" "%0")
- (match_operand:DI 2 "arith_reg_operand" "r")))
+ [(set (match_operand:DI 0 "arith_reg_dest")
+ (plus:DI (match_operand:DI 1 "arith_reg_operand")
+ (match_operand:DI 2 "arith_reg_operand")))
(clobber (reg:SI T_REG))]
"TARGET_SH1"
"#"
- "&& reload_completed"
+ "&& can_create_pseudo_p ()"
[(const_int 0)]
{
- rtx high0 = gen_highpart (SImode, operands[0]);
- rtx high2 = gen_highpart (SImode, operands[2]);
- rtx low0 = gen_lowpart (SImode, operands[0]);
-
emit_insn (gen_clrt ());
- emit_insn (gen_addc (low0, low0, gen_lowpart (SImode, operands[2])));
- emit_insn (gen_addc (high0, high0, high2));
+ emit_insn (gen_addc (gen_lowpart (SImode, operands[0]),
+ gen_lowpart (SImode, operands[1]),
+ gen_lowpart (SImode, operands[2])));
+ emit_insn (gen_addc (gen_highpart (SImode, operands[0]),
+ gen_highpart (SImode, operands[1]),
+ gen_highpart (SImode, operands[2])));
DONE;
})
@@ -2111,22 +2109,22 @@
(set_attr "highpart" "ignore")])
(define_insn_and_split "subdi3_compact"
- [(set (match_operand:DI 0 "arith_reg_dest" "=&r")
- (minus:DI (match_operand:DI 1 "arith_reg_operand" "0")
- (match_operand:DI 2 "arith_reg_operand" "r")))
+ [(set (match_operand:DI 0 "arith_reg_dest")
+ (minus:DI (match_operand:DI 1 "arith_reg_operand")
+ (match_operand:DI 2 "arith_reg_operand")))
(clobber (reg:SI T_REG))]
"TARGET_SH1"
"#"
- "&& reload_completed"
+ "&& can_create_pseudo_p ()"
[(const_int 0)]
{
- rtx high0 = gen_highpart (SImode, operands[0]);
- rtx high2 = gen_highpart (SImode, operands[2]);
- rtx low0 = gen_lowpart (SImode, operands[0]);
-
emit_insn (gen_clrt ());
- emit_insn (gen_subc (low0, low0, gen_lowpart (SImode, operands[2])));
- emit_insn (gen_subc (high0, high0, high2));
+ emit_insn (gen_subc (gen_lowpart (SImode, operands[0]),
+ gen_lowpart (SImode, operands[1]),
+ gen_lowpart (SImode, operands[2])));
+ emit_insn (gen_subc (gen_highpart (SImode, operands[0]),
+ gen_highpart (SImode, operands[1]),
+ gen_highpart (SImode, operands[2])));
DONE;
})
@@ -5570,8 +5568,8 @@ label:
"sub r63, %1, %0"
[(set_attr "type" "arith_media")])
-;; Don't expand immediately because otherwise neg:DI (abs:DI) will not be
-;; combined.
+;; 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")))
@@ -5579,12 +5577,12 @@ label:
"TARGET_SH1")
(define_insn_and_split "*negdi2"
- [(set (match_operand:DI 0 "arith_reg_dest" "=&r")
- (neg:DI (match_operand:DI 1 "arith_reg_operand" "r")))
+ [(set (match_operand:DI 0 "arith_reg_dest")
+ (neg:DI (match_operand:DI 1 "arith_reg_operand")))
(clobber (reg:SI T_REG))]
"TARGET_SH1"
"#"
- "&& reload_completed"
+ "&& can_create_pseudo_p ()"
[(const_int 0)]
{
emit_insn (gen_clrt ());
OpenPOWER on IntegriCloud