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] for PR18463


Zdenek Dvorak wrote:
> 
> This patch fixes the problem by letting ivopts know that the no-op cast
> to (float *) preserves the fact that o is an induction variable (ivopts
> do not care whether it wraps or not).  To this end, resolve_mixers
> (called from simple_iv) folds the casts using a more aggressive
> approach, without checking for wrapping.
> 
> Bootstrapped & regtested on i686 and x86_64.
> 

Ok.  Thanks for having solved this problem.

> *************** chrec_convert (tree type, tree chrec, tr
> *** 1201,1206 ****
> --- 1199,1233 ----
>     return res;
>   }
>   
> + /* Convert CHREC to TYPE, without regard to signed overflows.  Returns the new
> +    chrec if something else than what chrec_convert would do happens, NULL_TREE
> +    otherwise.  */
> + 
> + tree
> + chrec_convert_aggressive (tree type, tree chrec)
> + {
> +   tree inner_type, left, right, lc, rc;
> + 
> +   if (automatically_generated_chrec_p (chrec)
> +       || TREE_CODE (chrec) != POLYNOMIAL_CHREC)
> +     return NULL_TREE;
> + 
> +   inner_type = TREE_TYPE (chrec);

better use chrec_type (chrec).  Anyway you have the check to
automatically_generated_chrec_p just before, so TREE_TYPE is also safe.


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