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: PR/29798, def forward propagated even though it does not dominate use


> 2006-11-13  Paolo Bonzini  <bonzini@gnu.org>
> 
> 	PR rtl-optimization/29798
> 
> 	* fwprop.c (use_killed_between): Check that DEF_INSN dominates
> 	TARGET_INSN before any other check.
> 	(fwprop_init): Always calculate dominators.
> 	(fwprop_done): Always free them.
> 
> 2006-11-13  Paolo Bonzini  <bonzini@gnu.org>
> 
> 	* gcc.c-torture/execute/pr29798.c: New.
> 
> 
> #include <stdlib.h>
> 
> int
> main ()
> {
>   int i;
>   double oldrho;
>   double beta = 0.0;
>   double work = 1.0;
>   for (i = 1; i <= 2; i++)
>     {
>       double rho = work * work;
>       if (i != 1)
>         beta = rho / oldrho;
>       if (beta == 1.0)
>         abort ();
>       work /= 2.0;
>       oldrho = rho;
>     }
>   return 0;
> }

Is there any way to change the testcase so it does not use
floating point?  yes this testcase should be ok in base 2 fp
but not some targets use a non base 2 fp IIRC.

Thanks,
Andrew Pinski


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