This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Make PRE PHI insertion use an already available PHI


On Thu, Aug 21, 2008 at 10:14 AM, Richard Guenther <rguenther@suse.de> wrote:
>
> This makes us no longer rely on a second DOM pass for
> gcc.dg/builtins-20.c.  The case in question is
>
> extern double cos(double);
> void test2(double x, double y)
> {
>  if (cos(y<10 ? x : -y) != cos(y<10 ? x : y))
>      link_error ();
> }
>
> which we don't fold directly but have to deal with during optimization.
> PRE figures out that all is equivalent but produces
>
> <bb 4>:
>  # x_1 = PHI <x_5(D)(7), y_3(D)(3)>
>  # D.1955_15 = PHI <D.1955_14(7), D.1955_7(3)>
>  # prephitmp_22 = PHI <D.1955_14(7), D.1955_7(3)>
>  D.1960_10 = prephitmp_22;
>  if (D.1955_15 != D.1960_10)

Actually, this makes no sense to me.
If you have a phi node already for the value, it should have detected
it as a full redundancy, not a partial one.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]