[Bug tree-optimization/53168] ICE in find_or_generate_expression, at tree-ssa-pre.c:3053

rguenth at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed May 2 15:02:00 GMT 2012


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

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

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

--- Comment #3 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-05-02 15:00:54 UTC ---
It's what I always wondered about ... we phi-translate again during
do_regular_insertion but we fail to "clean" the result in any way.  So
we end with a translation result that is "invalid", thus one without
a leader and one which we cannot re-create.  That is, valid_in_sets returns
false for it.

Index: gcc/tree-ssa-pre.c
===================================================================
--- gcc/tree-ssa-pre.c  (revision 187042)
+++ gcc/tree-ssa-pre.c  (working copy)
@@ -3617,6 +3619,11 @@ do_regular_insertion (basic_block block,
                                                 vprime, NULL);
              if (edoubleprime == NULL)
                {
+                 if (!valid_in_sets (AVAIL_OUT (bprime), NULL, eprime,
bprime))
+                   {
+                     cant_insert = true;
+                     break;
+                   }
                  avail[bprime->index] = eprime;
                  all_same = false;
                }

Steven - do you by chance remember why "re-translating" during insertion
is ok?  Or is a phi-translation result that cannot be inserted in its
form at the end of the BB bogus (always? or only during insertion?).



More information about the Gcc-bugs mailing list