This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/82129] [8 Regression] ICE in compute_antic, at tree-ssa-pre.c:2447
- From: "rguenth at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 12 Sep 2017 12:36:14 +0000
- Subject: [Bug tree-optimization/82129] [8 Regression] ICE in compute_antic, at tree-ssa-pre.c:2447
- Auto-submitted: auto-generated
- References: <bug-82129-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82129
--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
Not yet analyzed but I see LIM performs store-motion on
<bb 8> [0.00%] [count: INV] [loop 5 header]:
- *h5_26(D) = tv_24(D);
+ h5__lsm.7_18 = tv_24(D);
where I think stores from undefined SSA names could be turned into CLOBBERs.
"Fixes" the testcase.
Index: gcc/gimple-fold.c
===================================================================
--- gcc/gimple-fold.c (revision 252002)
+++ gcc/gimple-fold.c (working copy)
@@ -410,6 +410,16 @@ fold_gimple_assign (gimple_stmt_iterator
else if (DECL_P (rhs))
return get_symbol_constant_value (rhs);
+
+ else if (TREE_CODE (rhs) == SSA_NAME
+ && SSA_NAME_IS_DEFAULT_DEF (rhs)
+ && ! ssa_defined_default_def_p (rhs)
+ && gimple_store_p (stmt))
+ {
+ tree clobber = build_constructor (TREE_TYPE (rhs), NULL);
+ TREE_THIS_VOLATILE (clobber) = true;
+ return clobber;
+ }
}
break;