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



vries at gcc dot gnu.org changed:



           What    |Removed                     |Added

----------------------------------------------------------------------------

                 CC|                            |rguenth at gcc dot gnu.org



--- Comment #5 from vries at gcc dot gnu.org 2012-10-30 15:49:42 UTC ---

tentative patch:

...

Index: gcc/tree-ssa-pre.c

===================================================================

--- gcc/tree-ssa-pre.c    (revision 192023)

+++ gcc/tree-ssa-pre.c    (working copy)

@@ -1657,6 +1657,16 @@ phi_translate_1 (pre_expr expr, bitmap_set_t set1,

         if (result)

           VEC_free (vn_reference_op_s, heap, newoperands);



+        if (result && TREE_CODE (result) == SSA_NAME)

+          {

+        gimple def_stmt = SSA_NAME_DEF_STMT (result);

+        basic_block def_bb = gimple_bb (def_stmt);

+        if (def_bb != pred

+            && !dominated_by_p (CDI_DOMINATORS, pred,

+                    def_bb))

+          return NULL;

+          }

+

         /* We can always insert constants, so if we have a partial

            redundant constant load of another type try to translate it

            to a constant of appropriate type.  */

...

Reply via email to