This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix multiply-add regressions after expand-from-SSA
On Thu, 30 Apr 2009, Richard Guenther wrote:
> On Thu, 30 Apr 2009, Paolo Bonzini wrote:
>
> >
> > > Actually the helper could look like
> >
> > Couldn't this lead to wrong code for
> >
> > a_1 = b_1 * c_1;
> > b_2 = b_1 + 1.0;
> > c_3 = b_2 + a_1;
> >
> > where b_1 and b_2 could be assigned to the same partition and so the
> > final result would be "b_2 + b_2 * c_1"?
>
> Hm. Yes, I suppose so.
OTOH this asks for detecting this stuff early, before partitioning
(together with uncprop maybe). Which would make it instruction
selection (or rather optab matching). The cases in question
(widening multiplication) could be transformed to builtin
function calls on the tree level (in name matching the optab
functions), dependent on target support of course.
Also because widening multiply is likely even profitable in the
non-single use case that TER handled.
Richard.