This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/82449] code-gen error in get_rename_from_scev
- From: "rguenther at suse dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 06 Oct 2017 13:32:03 +0000
- Subject: [Bug tree-optimization/82449] code-gen error in get_rename_from_scev
- Auto-submitted: auto-generated
- References: <bug-82449-4@http.gcc.gnu.org/bugzilla/>
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...