This is the mail archive of the
mailing list for the GCC project.
Re: extending fpmuls
- From: Jakub Jelinek <jakub at redhat dot com>
- To: David Miller <davem at davemloft dot net>
- Cc: gcc at gcc dot gnu dot org, rth at redhat dot com
- Date: Tue, 25 Oct 2011 10:00:50 +0200
- Subject: Re: extending fpmuls
- References: <firstname.lastname@example.org>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Mon, Oct 24, 2011 at 11:12:29PM -0400, David Miller wrote:
> While working on some test cases I noticed that the 'fsmuld'
> instruction on sparc was not being matched by the combiner for
> things like:
> double fsmuld (float a, float b)
> return a * b;
> Combine does try to match:
> (set x (float_extend:DF (mul:SF y z)))
That is correct. float a * float b is supposed to e.g. result in Inf
if the product overflows float (but would still fit into double).
double fsmuld (float a, float b)
return (double) a * b;
instead will match your pattern, then the operands are first extended
into double and then multiplied into a double product.