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]
Other format: [Raw text]

[Committed] S/390: Allow 2 mem operands in the multiply and add patterns


Hi,

the multiply and add/sub instructions on S/390 are currently not used
if both multiplication operands come from memory since combine isn't
able to match it.  As usual this gets fixed by lying a bit in the insn
predicate knowing that reload will always be able to fix it.

Bootstrapped and regtested on s390 and s390x (with rev. 151118).

Committed to mainline.

Bye,

-Andreas-


2009-09-04  Andreas Krebbel  <krebbel1@de.ibm.com>

	* config/s390/s390.md ("*fmadd<mode>", "*fmsub<mode>"): Enable mem
	RTXs in the predicate for operand 1.


Index: gcc/config/s390/s390.md
===================================================================
*** gcc/config/s390/s390.md.orig	2009-08-20 11:23:09.000000000 +0200
--- gcc/config/s390/s390.md	2009-09-03 10:35:15.000000000 +0200
***************
*** 5286,5293 ****
  ; madbr, maebr, maxb, madb, maeb
  (define_insn "*fmadd<mode>"
    [(set (match_operand:DSF 0 "register_operand" "=f,f")
! 	(plus:DSF (mult:DSF (match_operand:DSF 1 "register_operand" "%f,f")
! 			    (match_operand:DSF 2 "nonimmediate_operand"  "f,R"))
  		 (match_operand:DSF 3 "register_operand" "0,0")))]
    "TARGET_HARD_FLOAT && TARGET_FUSED_MADD"
    "@
--- 5286,5293 ----
  ; madbr, maebr, maxb, madb, maeb
  (define_insn "*fmadd<mode>"
    [(set (match_operand:DSF 0 "register_operand" "=f,f")
! 	(plus:DSF (mult:DSF (match_operand:DSF 1 "nonimmediate_operand" "%f,f")
! 			    (match_operand:DSF 2 "nonimmediate_operand" "f,R"))
  		 (match_operand:DSF 3 "register_operand" "0,0")))]
    "TARGET_HARD_FLOAT && TARGET_FUSED_MADD"
    "@
***************
*** 5299,5306 ****
  ; msxbr, msdbr, msebr, msxb, msdb, mseb
  (define_insn "*fmsub<mode>"
    [(set (match_operand:DSF 0 "register_operand" "=f,f")
! 	(minus:DSF (mult:DSF (match_operand:DSF 1 "register_operand" "f,f")
! 			     (match_operand:DSF 2 "nonimmediate_operand"  "f,R"))
  		 (match_operand:DSF 3 "register_operand" "0,0")))]
    "TARGET_HARD_FLOAT && TARGET_FUSED_MADD"
    "@
--- 5299,5306 ----
  ; msxbr, msdbr, msebr, msxb, msdb, mseb
  (define_insn "*fmsub<mode>"
    [(set (match_operand:DSF 0 "register_operand" "=f,f")
! 	(minus:DSF (mult:DSF (match_operand:DSF 1 "nonimmediate_operand" "f,f")
! 			     (match_operand:DSF 2 "nonimmediate_operand" "f,R"))
  		 (match_operand:DSF 3 "register_operand" "0,0")))]
    "TARGET_HARD_FLOAT && TARGET_FUSED_MADD"
    "@


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