diff mbox

[SH] Remove addc1 and subc1

Message ID 1343023617.2373.42.camel@yam-132-YW-E178-FTW
State New
Headers show

Commit Message

Oleg Endo July 23, 2012, 6:06 a.m. UTC
Hello,

The attach patch replaces the use of the 'addc1' pattern with 'addc' and
the use of the 'subc1' pattern with 'subc'.
Tested with

make -k check RUNTESTFLAGS="--target_board=sh-sim
\{-m2/-ml,-m2/-mb,-m2a/-mb,-m2a-single/-mb,-m4/-ml,-m4/-mb,-m4-single/-ml,
-m4-single/-mb,-m4a-single/-ml,-m4a-single/-mb}"

and no new failures.  CSiBE result-size also doesn't show any change for
'-O2 -m4-single -ml -mpretend-cmove'.

OK?

Cheers,
Oleg

ChangeLog:

	* config/sh/sh.md (addc1, subc1): Delete.
	(adddi3_compact): Use addc instead of addc1.
	(subdi3_compact): Use subc instead of subc1.

Comments

Kaz Kojima July 23, 2012, 9:57 p.m. UTC | #1
Oleg Endo <oleg.endo@t-online.de> wrote:
> The attach patch replaces the use of the 'addc1' pattern with 'addc' and
> the use of the 'subc1' pattern with 'subc'.
> Tested with
> 
> make -k check RUNTESTFLAGS="--target_board=sh-sim
> \{-m2/-ml,-m2/-mb,-m2a/-mb,-m2a-single/-mb,-m4/-ml,-m4/-mb,-m4-single/-ml,
> -m4-single/-mb,-m4a-single/-ml,-m4a-single/-mb}"
> 
> and no new failures.  CSiBE result-size also doesn't show any change for
> '-O2 -m4-single -ml -mpretend-cmove'.
> 
> OK?

OK.

Regards,
	kaz
diff mbox

Patch

Index: gcc/config/sh/sh.md
===================================================================
--- gcc/config/sh/sh.md	(revision 189747)
+++ gcc/config/sh/sh.md	(working copy)
@@ -1447,7 +1447,7 @@ 
 
   emit_insn (gen_clrt ());
   emit_insn (gen_addc (low0, low0, gen_lowpart (SImode, operands[2])));
-  emit_insn (gen_addc1 (high0, high0, high2));
+  emit_insn (gen_addc (high0, high0, high2));
   DONE;
 })
 
@@ -1462,16 +1462,6 @@ 
   "addc	%2,%0"
   [(set_attr "type" "arith")])
 
-(define_insn "addc1"
-  [(set (match_operand:SI 0 "arith_reg_dest" "=r")
-	(plus:SI (plus:SI (match_operand:SI 1 "arith_reg_operand" "0")
-			  (match_operand:SI 2 "arith_reg_operand" "r"))
-		 (reg:SI T_REG)))
-   (clobber (reg:SI T_REG))]
-  "TARGET_SH1"
-  "addc	%2,%0"
-  [(set_attr "type" "arith")])
-
 (define_expand "addsi3"
   [(set (match_operand:SI 0 "arith_reg_operand" "")
 	(plus:SI (match_operand:SI 1 "arith_operand" "")
@@ -1565,7 +1555,7 @@ 
 
   emit_insn (gen_clrt ());
   emit_insn (gen_subc (low0, low0, gen_lowpart (SImode, operands[2])));
-  emit_insn (gen_subc1 (high0, high0, high2));
+  emit_insn (gen_subc (high0, high0, high2));
   DONE;
 })
 
@@ -1582,16 +1572,6 @@ 
   "subc	%2,%0"
   [(set_attr "type" "arith")])
 
-(define_insn "subc1"
-  [(set (match_operand:SI 0 "arith_reg_dest" "=r")
-	(minus:SI (minus:SI (match_operand:SI 1 "arith_reg_operand" "0")
-			    (match_operand:SI 2 "arith_reg_operand" "r"))
-		  (reg:SI T_REG)))
-   (clobber (reg:SI T_REG))]
-  "TARGET_SH1"
-  "subc	%2,%0"
-  [(set_attr "type" "arith")])
-
 ;; life_analysis thinks rn is live before subc rn,rn, so make a special
 ;; pattern for this case.  This helps multimedia applications that compute
 ;; the sum of absolute differences.