This is the mail archive of the 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]

[RFA] Patch to smsub_widen_optab & umsub_widen_optab


  This patch extends the MADD patch posted by Richard on
to support MSUB.  Eight MIPS tests are included.
The patch and tests are very similar to the original patch,
except that the reversed-operand test is not included.
If I swap the subtrahend and the minuend in the test,
GCC does not swap operands back (before expanding tree to rtl)
and fails to recognize the MSUB pattern.
Ok to commit?  Thanks!


2007-05-07  Chao-ying Fu  <>

	* doc/md.texi (msub@var{m}@var{n}4, usub@var{m}@var{n}4): Document.
	* optabs.h (OTI_smsub_widen, OTI_umsub_widen): New optab_indexes.
	(smsub_widen_optab, umsub_widen_optab): Define.
	* optabs.c (init_optabs): Initialize smsub_widen_optab and
	* genopinit.c (optabs): Fill in smsub_widen_optab and
	* expr.c (expand_expr_real_1): Try to use smsub_widen_optab
	and umsub_widen_optab to implement multiply-subtract sequences.
	* config/mips/ (*msac<u>_di): Rename to...
	(<u>msubsidi4): ...this.  Extend condition to include
	GENERATE_MADD_MSUB and TARGET_DSPR2.  Change the constraint
	of operand 0 to "ka" and use the three-operand form of msub<u>
	* config/mips/ (mips_msub, mips_msubu): Convert
	to define_expands.

2007-05-07  Chao-ying Fu  <>

	*, New tests.

Attachment: gcc.diff
Description: gcc.diff

Attachment: msub-1.c
Description: msub-1.c

Attachment: msub-2.c
Description: msub-2.c

Attachment: msub-3.c
Description: msub-3.c

Attachment: msub-4.c
Description: msub-4.c

Attachment: msubu-1.c
Description: msubu-1.c

Attachment: msubu-2.c
Description: msubu-2.c

Attachment: msubu-3.c
Description: msubu-3.c

Attachment: msubu-4.c
Description: msubu-4.c

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