This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[SH] Fold negc expander and insn
- From: Oleg Endo <oleg dot endo at t-online dot de>
- To: gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Sat, 21 Jul 2012 22:51:33 +0200
- Subject: [SH] Fold negc expander and insn
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.
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"))))