diff mbox

[SH] PR 53511 - Cleanup leftovers

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

Commit Message

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

This removes the fmac related combine helper construct that was used
before fma.

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 (-O2 -m4-single-ml -mpretend-cmove) shows no changes in
result-size.

OK?

Cheers,
Oleg

ChangeLog:

	* config/sh/sh.md (mulsf3_ie): Delete.
	(mulsf3_i4): Rename to mulsf3_i.
	(mulsf3): Emit mulsf3_i insn.

Comments

Kaz Kojima July 23, 2012, 9:59 p.m. UTC | #1
Oleg Endo <oleg.endo@t-online.de> wrote:
> This removes the fmac related combine helper construct that was used
> before fma.
> 
> 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 (-O2 -m4-single-ml -mpretend-cmove) shows no changes in
> result-size.
> 
> 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)
@@ -10260,7 +10260,14 @@ 
 	(mult:SF (match_operand:SF 1 "fp_arith_reg_operand" "")
 		 (match_operand:SF 2 "fp_arith_reg_operand" "")))]
   "TARGET_SH2E || TARGET_SHMEDIA_FPU"
-  "")
+{
+  if (TARGET_SH2E)
+    {
+      emit_insn (gen_mulsf3_i (operands[0], operands[1], operands[2],
+		 get_fpscr_rtx ()));
+      DONE;
+    }
+})
 
 (define_insn "*mulsf3_media"
   [(set (match_operand:SF 0 "fp_arith_reg_operand" "=f")
@@ -10270,32 +10277,9 @@ 
   "fmul.s	%1, %2, %0"
   [(set_attr "type" "fparith_media")])
 
-;; FIXME: These fmac combine pass assisting specifics are obsolete since 
-;;	  we now use the FMA patterns, which do not depend on the combine
-;;	  pass anymore.
-;; Unfortunately, the combiner is unable to cope with the USE of the FPSCR
-;; register in feeding fp instructions.  Thus, in order to generate fmac,
-;; we start out with a mulsf pattern that does not depend on fpscr.
-;; This is split after combine to introduce the dependency, in order to
-;; get mode switching and scheduling right.
-(define_insn_and_split "mulsf3_ie"
+(define_insn "mulsf3_i"
   [(set (match_operand:SF 0 "fp_arith_reg_operand" "=f")
 	(mult:SF (match_operand:SF 1 "fp_arith_reg_operand" "%0")
-		 (match_operand:SF 2 "fp_arith_reg_operand" "f")))]
-  "TARGET_SH2E"
-  "fmul	%2,%0"
-  "TARGET_SH4 || TARGET_SH2A_SINGLE"
-  [(const_int 0)]
-{
-  emit_insn (gen_mulsf3_i4 (operands[0], operands[1], operands[2],
-	     get_fpscr_rtx ()));
-  DONE;
-}
-  [(set_attr "type" "fp")])
-
-(define_insn "mulsf3_i4"
-  [(set (match_operand:SF 0 "fp_arith_reg_operand" "=f")
-	(mult:SF (match_operand:SF 1 "fp_arith_reg_operand" "%0")
 		 (match_operand:SF 2 "fp_arith_reg_operand" "f")))
    (use (match_operand:PSI 3 "fpscr_operand" "c"))]
   "TARGET_SH2E"