http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52621

Richard Guenther <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |spop at gcc dot gnu.org

--- Comment #10 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-04-05 
11:27:02 UTC ---
evolution_function_is_univariate_p returns true for

{(integer(kind=8)) {0, +, {2, +, 2}_2}_2, +, 1}_3

but that does not look univariate to me - we do not properly look into
CHREC_LEFT which is (integer(kind=8)) {0, +, {2, +, 2}_2}_2, so something
like

@@ -1114,6 +1132,8 @@ evolution_function_is_univariate_p (cons
          break;

        default:
+         if (tree_contains_chrecs (CHREC_LEFT (chrec), NULL))
+           return false;
          break;
        }

@@ -1127,6 +1147,8 @@ evolution_function_is_univariate_p (cons
          break;

        default:
+         if (tree_contains_chrecs (CHREC_RIGHT (chrec), NULL))
+           return false;
          break;
        }

fixes this.  Then we ICE the same way in analyze_miv_subscript because
we think that beast is affine-multivariate.

The above fix looks obvious to me, but what the right condition for
failing in analyze_overlapping_iterations should be for "loop_nest"
should be, and why using the loop number of the outermost loop of the
nest should be sufficient is beyond my understanding.

Sebastian, can you help?  I can certainly amend

  /* If they aren't the same, and aren't affine, we can't do anything
     yet.  */
  else if ((chrec_contains_symbols (chrec_a)
            || chrec_contains_symbols (chrec_b))
           && (!evolution_function_is_affine_multivariate_p (chrec_a, lnn)
               || !evolution_function_is_affine_multivariate_p (chrec_b, lnn)))
    {
      dependence_stats.num_subscript_undetermined++;
      *overlap_iterations_a = conflict_fn_not_known ();
      *overlap_iterations_b = conflict_fn_not_known ();
    }

though it looks to me that this should go into the else part and
the analyze_miv_subscript case lacks a proper test.

Reply via email to