This is the mail archive of the gcc-bugs@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]

[Bug tree-optimization/82449] code-gen error in get_rename_from_scev


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82449

--- Comment #3 from rguenther at suse dot de <rguenther at suse dot de> ---
On Fri, 6 Oct 2017, spop at gcc dot gnu.org wrote:

> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82449
> 
> --- Comment #2 from Sebastian Pop <spop at gcc dot gnu.org> ---
> This part is not affine: {0, +, {1, +, 1}_1}_1
> This is a polynomial of degree 2.
> Are you sure the scev analysis reports this as affine?

Yes:

/* Determine whether CHREC is an affine evolution function or not.  */

static inline bool
evolution_function_is_affine_p (const_tree chrec)
{
  return chrec
    && TREE_CODE (chrec) == POLYNOMIAL_CHREC
    && evolution_function_is_invariant_p (CHREC_RIGHT (chrec),
                                          CHREC_VARIABLE (chrec))
    && (TREE_CODE (CHREC_RIGHT (chrec)) != POLYNOMIAL_CHREC
        || evolution_function_is_affine_p (CHREC_RIGHT (chrec)));
}

this doesn't look at CHREC_LEFT at all (because technically CHREC_LEFT
is not part of the evolution of CHREC).

> I was trying to understand from the fortran code which part this scev comes
> from...
> and I think it comes from the NKL counter that gets incremented in the inner
> loop,
> counting the number of iterations of both loops, so it has a quadratic
> evolution.

Yes.  I guess we should still be able to generate an expression for
it somehow...

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