This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Extend widening_mul pass to handle fixed-point types
- From: Bernd Schmidt <bernds at codesourcery dot com>
- To: gcc-patches at gcc dot gnu dot org, rdsandiford at googlemail dot com
- Date: Sun, 18 Jul 2010 22:46:45 +0200
- Subject: Re: Extend widening_mul pass to handle fixed-point types
- References: <87fwzhro8i.fsf@firetop.home>
On 07/18/2010 02:03 PM, Richard Sandiford wrote:
> + /* At present, WIDEN_MULT_EXPR only supports integer types,
> + not fixed-point ones. Processing fixed-point types is only
> + useful if the caller wants the unextended operands. */
> + if (TREE_CODE (type) == FIXED_POINT_TYPE)
> + use_widen_mult_p = false;
I don't like this bit. I'd break up this function into one that just
extracts the unwidened operands, and another one that generates the
widening multiply. The former can then be used for also generating
widening-macc. Whether to generate anything for fixed-point should just
depend on the availability of the optabs.
Ok with that change.
Bernd