This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [graphite] Fix PR37485
- From: Richard Guenther <rguenther at suse dot de>
- To: Sebastian Pop <sebpop at gmail dot com>
- Cc: Diego Novillo <dnovillo at google dot com>, Harsha Jagasia <harsha dot jagasia at amd dot com>, jan_sjodin at yahoo dot com, gcc-patches at gcc dot gnu dot org, David Edelsohn <dje dot gcc at gmail dot com>, "Harle, Christophe" <christophe dot harle at amd dot com>
- Date: Sat, 4 Oct 2008 00:06:07 +0200 (CEST)
- Subject: Re: [graphite] Fix PR37485
- References: <20080916224151.32134.13749.sendpatchset@gold2-shenzi.amd.com> <b798aad50809260402i76f77274se90f6abc15f0fdc0@mail.gmail.com> <cb9d34b20809301715k3d501bb4v8d43842807ff9849@mail.gmail.com> <cb9d34b20810021552y1f214477v62358052664eace6@mail.gmail.com>
On Thu, 2 Oct 2008, Sebastian Pop wrote:
> Ping patches.
>
> FYI, I've merged the graphite branch, and I've committed the
> attached fixes to the graphite branch.
IMHO the tree-ssa-loop-ivopts.c patch is wrong. Which path
do we go to the failure? It looks like we should instead
fix the type of comp earlier. At least
/* Otherwise, add the necessary computations to express
the iv. */
op = fold_convert (ctype, cand->var_before);
comp = fold_convert (utype,
build2 (incr_code, ctype, op,
unshare_expr (step)));
doesn't look completely correct.
But you may want to try the following to detect latent type
problems with the testcase.
Richard.
2008-09-11 Richard Guenther <rguenther@suse.de>
* tree-cfg.c (remove_useless_stmts): Verify stmts afterwards.
(verify_stmts): Dispatch to gimple/type verification code.
Index: trunk/gcc/tree-cfg.c
===================================================================
*** trunk.orig/gcc/tree-cfg.c
--- trunk/gcc/tree-cfg.c
*************** remove_useless_stmts (void)
*** 2024,2029 ****
--- 2024,2034 ----
remove_useless_stmts_1 (&gsi, &data);
}
while (data.repeat);
+
+ #ifdef ENABLE_TYPES_CHECKING
+ verify_types_in_gimple_seq (gimple_body (current_function_decl));
+ #endif
+
return 0;
}
*************** verify_stmts (void)
*** 4153,4158 ****
--- 4210,4221 ----
err |= true;
}
}
+
+ if (verify_gimple_phi (phi))
+ {
+ debug_gimple_stmt (phi);
+ err |= true;
+ }
}
for (gsi = gsi_start_bb (bb); !gsi_end_p (gsi); )
*************** verify_stmts (void)
*** 4189,4194 ****
--- 4252,4263 ----
}
err |= verify_stmt (&gsi);
+
+ if (verify_types_in_gimple_stmt (gsi_stmt (gsi)))
+ {
+ debug_gimple_stmt (stmt);
+ err |= true;
+ }
addr = walk_gimple_op (gsi_stmt (gsi), verify_node_sharing, &wi);
if (addr)
{