Re: extending fpmuls

2011-10-25 Thread Joseph S. Myers
On Tue, 25 Oct 2011, Frederic Riss wrote: > When I read the paragraph on expression contraction, it seems that a > lot of liberty is left to the implementation wrt the kind of > contraction it does. The footnotes even talk about different accuracy, > loss of predictability and fast machine specifi

Re: extending fpmuls

2011-10-25 Thread Frederic Riss
On 25 October 2011 16:45, Joseph S. Myers wrote: > On Tue, 25 Oct 2011, Frederic Riss wrote: > Contracting (which is independent from excess precision) is controlled by > -ffp-contract.  This can operate at the very latest at the GIMPLE level > (it needs to know about original expression boundarie

Re: extending fpmuls

2011-10-25 Thread Joseph S. Myers
On Tue, 25 Oct 2011, Frederic Riss wrote: > Some time ago, I tried to read the C standard to see what ports were > authorized to do with regard to that kind of issues. I (most > certainly wrongly) came to the conclusion that it was conformant to > generate an insn doing (set x (mul:DF (float_ext

Re: extending fpmuls

2011-10-25 Thread Jakub Jelinek
On Tue, Oct 25, 2011 at 11:12:25AM +0200, Frederic Riss wrote: > Could you explain why the overflow is required here with respect to > the standard? Because most of gcc targets (the only exception is i386 and m68k I think) define FLT_EVAL_METHOD 0, so say that floating point expressions are evalua

Re: extending fpmuls

2011-10-25 Thread Frederic Riss
Hi On 25 October 2011 10:00, Jakub Jelinek wrote: > 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

Re: extending fpmuls

2011-10-25 Thread David Miller
From: Jakub Jelinek Date: Tue, 25 Oct 2011 10:00:50 +0200 > I bet > 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. Right, in existing testcases I'

Re: extending fpmuls

2011-10-25 Thread Jakub Jelinek
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

extending fpmuls

2011-10-24 Thread David Miller
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))) instead of what backends (and