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). 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. Jakub