diff mbox

[SH] Fold negc expander and insn

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

Commit Message

Oleg Endo July 21, 2012, 8:51 p.m. UTC
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.

Comments

Kaz Kojima July 22, 2012, 9:58 p.m. UTC | #1
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
diff mbox

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"))))