While looking at some matrix code I noticed that the generic mips scheduler
was putting out a bunch of integer madd instructions in a row and that
I got better performance (on 74kc and proAptiv) when they were spread out.

I was wondering what folks thought of this change to specify that the
integer madd instruction uses the alu and the imuldiv functional units?

Tested on 74kc and proAptive with no regressions and better performance.

OK to checkin?

Steve Ellcey
sell...@imgtec.com



2013-05-20  Steve Ellcey  <sell...@imgtec.com>

        * config/mips/generic.md (generic_imul): Remove imadd.
        (generic_imadd): New.


diff --git a/gcc/config/mips/generic.md b/gcc/config/mips/generic.md
index 6051630..f187e0b 100644
--- a/gcc/config/mips/generic.md
+++ b/gcc/config/mips/generic.md
@@ -47,9 +47,13 @@
   "imuldiv*3")
 
 (define_insn_reservation "generic_imul" 17
-  (eq_attr "type" "imul,imul3,imadd")
+  (eq_attr "type" "imul,imul3")
   "imuldiv*17")
 
+(define_insn_reservation "generic_imadd" 17
+  (eq_attr "type" "imadd")
+  "(alu+imuldiv)*17")
+
 (define_insn_reservation "generic_idiv" 38
   (eq_attr "type" "idiv")
   "imuldiv*38")

Reply via email to