This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

ia64 multiply tweek


Fix predicates on mulsi3.  In many case the multiply-add patterns
won't match unless we allow gr registers.


r~

        * config/ia64/ia64.md (mulsi3): Use grfr_register_operand.
        (madddi3): Likewise.
        (maddsi3): New.

Index: gcc/config/ia64/ia64.md
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/ia64/ia64.md,v
retrieving revision 1.40
diff -c -p -d -r1.40 ia64.md
*** ia64.md	2000/08/29 21:29:55	1.40
--- ia64.md	2000/09/01 21:25:19
***************
*** 1372,1387 ****
    "sub %0 = %2, %1, 1"
    [(set_attr "type" "A")])
  
- ;; ??? Could add maddsi3 patterns patterned after the madddi3 patterns.
- 
  (define_insn "mulsi3"
    [(set (match_operand:SI 0 "fr_register_operand" "=f")
! 	(mult:SI (match_operand:SI 1 "fr_register_operand" "f")
! 		 (match_operand:SI 2 "nonmemory_operand" "f")))]
    ""
    "xma.l %0 = %1, %2, f0%B0"
    [(set_attr "type" "F")])
  
  (define_insn "negsi2"
    [(set (match_operand:SI 0 "gr_register_operand" "=r")
  	(neg:SI (match_operand:SI 1 "gr_register_operand" "r")))]
--- 1372,1394 ----
    "sub %0 = %2, %1, 1"
    [(set_attr "type" "A")])
  
  (define_insn "mulsi3"
    [(set (match_operand:SI 0 "fr_register_operand" "=f")
! 	(mult:SI (match_operand:SI 1 "grfr_register_operand" "f")
! 		 (match_operand:SI 2 "grfr_register_operand" "f")))]
    ""
    "xma.l %0 = %1, %2, f0%B0"
    [(set_attr "type" "F")])
  
+ (define_insn "*maddsi3"
+   [(set (match_operand:SI 0 "fr_register_operand" "=f")
+ 	(plus:SI (mult:SI (match_operand:SI 1 "grfr_register_operand" "f")
+ 			  (match_operand:SI 2 "grfr_register_operand" "f"))
+ 		 (match_operand:SI 3 "grfr_register_operand" "f")))]
+   ""
+   "xma.l %0 = %1, %2, %3%B0"
+   [(set_attr "type" "F")])
+ 
  (define_insn "negsi2"
    [(set (match_operand:SI 0 "gr_register_operand" "=r")
  	(neg:SI (match_operand:SI 1 "gr_register_operand" "r")))]
***************
*** 1532,1540 ****
  
  (define_insn "*madddi3"
    [(set (match_operand:DI 0 "fr_register_operand" "=f")
! 	(plus:DI (mult:DI (match_operand:DI 1 "fr_register_operand" "f")
! 			  (match_operand:DI 2 "fr_register_operand" "f"))
! 		 (match_operand:DI 3 "fr_register_operand" "f")))
     (clobber (match_scratch:DI 4 "=X"))]
    ""
    "xma.l %0 = %1, %2, %3%B0"
--- 1539,1547 ----
  
  (define_insn "*madddi3"
    [(set (match_operand:DI 0 "fr_register_operand" "=f")
! 	(plus:DI (mult:DI (match_operand:DI 1 "grfr_register_operand" "f")
! 			  (match_operand:DI 2 "grfr_register_operand" "f"))
! 		 (match_operand:DI 3 "grfr_register_operand" "f")))
     (clobber (match_scratch:DI 4 "=X"))]
    ""
    "xma.l %0 = %1, %2, %3%B0"

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]