Patchwork [SH] Fold negc expander and insn

login
register
mail settings
Submitter Oleg Endo
Date July 21, 2012, 8:51 p.m.
Message ID <1342903893.2143.105.camel@yam-132-YW-E178-FTW>
Download mbox | patch
Permalink /patch/172456/
State New
Headers show

Comments

Oleg Endo - July 21, 2012, 8:51 p.m.
Hello,

The attached patch folds the negc expander and *negc insn.
Tested with 'make all'.  CSiBE result-size (-m4-single -ml
-mpretend-cmove) also doesn't show any change.

OK?

Cheers,
Oleg

ChangeLog:

	* config/sh/sh.md (negc): Delete expander.
	(*negc): Rename insn to negc.
Kaz Kojima - July 22, 2012, 9:58 p.m.
Oleg Endo <oleg.endo@t-online.de> wrote:
> The attached patch folds the negc expander and *negc insn.
> Tested with 'make all'.  CSiBE result-size (-m4-single -ml
> -mpretend-cmove) also doesn't show any change.
> 
> OK?

OK.

Regards,
	kaz

Patch

Index: gcc/config/sh/sh.md
===================================================================
--- gcc/config/sh/sh.md	(revision 189747)
+++ gcc/config/sh/sh.md	(working copy)
@@ -4256,17 +4256,7 @@ 
 ;; Unary arithmetic
 ;; -------------------------------------------------------------------------
 
-(define_expand "negc"
-  [(parallel [(set (match_operand:SI 0 "arith_reg_dest" "")
-	(neg:SI (plus:SI (reg:SI T_REG)
-			 (match_operand:SI 1 "arith_reg_operand" ""))))
-   (set (reg:SI T_REG)
-	(ne:SI (ior:SI (reg:SI T_REG) (match_dup 1))
-	       (const_int 0)))])]
-  ""
-  "")
-
-(define_insn "*negc"
+(define_insn "negc"
   [(set (match_operand:SI 0 "arith_reg_dest" "=r")
 	(neg:SI (plus:SI (reg:SI T_REG)
 			 (match_operand:SI 1 "arith_reg_operand" "r"))))