[Bug tree-optimization/83176] [8 Regression] [graphite] ICE in set_codegen_error, at graphite-isl-ast-to-gimple.c:206

rguenth at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon Nov 27 10:14:00 GMT 2017


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

           What    |Removed                     |Added
             Status|UNCONFIRMED                 |ASSIGNED
   Last reconfirmed|                            |2017-11-27
           Assignee|unassigned at gcc dot gnu.org      |rguenth at gcc dot gnu.org
   Target Milestone|---                         |8.0
     Ever confirmed|0                           |1

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---

(gdb) p debug_generic_expr (scev)
{(int) {(unsigned int) pretmp_68, +, 2147483712}_4, +, 8555712}_2

and we fail in chrec_apply for _2 doing

          /* "{a, +, b} (x)"  ->  "a + b*x".  */
          x = chrec_convert_rhs (type, x, NULL);
          res = chrec_fold_multiply (TREE_TYPE (x), CHREC_RIGHT (chrec), x);
          res = chrec_fold_plus (type, CHREC_LEFT (chrec), res);

chrec_fold_plus (int, (int) {(unsigned int) pretmp_68, +, 2147483712}_4,
                 (int) graphite_IV.18_31 * 8555712)

which has

  switch (TREE_CODE (op0))
      if (tree_contains_chrecs (op0, NULL))
        return chrec_dont_know;
      /* FALLTHRU */

I think we can handle this particular case as

  (int) {(unsigned int) pretmp_68 + (unsigned int) (int) graphite_IV.18_31 *
8555712, +, 2147483712}_4

but in the end during SCEV validation we may want to avoid conversions of
CHRECs in not outer context.

More information about the Gcc-bugs mailing list