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]

[patch, ARM] Add mulhi3 expander.


When we have the DSP multiply extension (armv5e and up for ARM or T2), then a 16-bit multiply is best done with smulbb rather than mul. This saves us doing redundant extends and may even be a faster instruction on some cores. Unfortunately, expand does not try this operation by default; but it's trivial to add to the back-end. Since the value produced is extended, we represent this by expanding into the widening mul version and then subreg-ing the result.

	* arm.md (mulhi3): New expand pattern.

R.

Attachment: mulhi.patch
Description: Text document


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