]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR tree-optimization/50763 (ICE: verify_gimple failed: missing PHI def with -ftree...
authorTom de Vries <tom@codesourcery.com>
Wed, 26 Oct 2011 09:33:49 +0000 (09:33 +0000)
committerTom de Vries <vries@gcc.gnu.org>
Wed, 26 Oct 2011 09:33:49 +0000 (09:33 +0000)
2011-10-26  Tom de Vries  <tom@codesourcery.com>

PR tree-optimization/50763
* tree-ssa-tail-merge.c (replace_block_by): Update vops if phi_vuse1 or
phi_vuse2 is NULL_TREE only if bb1 dominates or is dominated by bb2.

From-SVN: r180518

gcc/ChangeLog
gcc/tree-ssa-tail-merge.c

index a54e9490afee74513719c078b09739b2902bdcd1..1a09dcc78c3812bd05ec37c0c6dc17b916db5b26 100644 (file)
@@ -1,3 +1,9 @@
+2011-10-26  Tom de Vries  <tom@codesourcery.com>
+
+       PR tree-optimization/50763
+       * tree-ssa-tail-merge.c (replace_block_by): Update vops if phi_vuse1 or
+       phi_vuse2 is NULL_TREE only if bb1 dominates or is dominated by bb2.
+
 2011-10-26  Richard Guenther  <rguenther@suse.de>
 
        PR lto/41844
index f7b2f5278d7a7b896b57726202b7cc600d49de36..eb4bc92bd62154c0f664383c49d0770c3c37aee9 100644 (file)
@@ -1551,7 +1551,12 @@ replace_block_by (basic_block bb1, basic_block bb2, bool update_vops)
       phi_vuse1 = vop_at_entry (bb1);
 
       /* If both are not found, it means there's no need to update.  */
-      update_vops = phi_vuse1 != NULL_TREE || phi_vuse2 != NULL_TREE;
+      if (phi_vuse1 == NULL_TREE && phi_vuse2 == NULL_TREE)
+       update_vops = false;
+      else if (phi_vuse1 == NULL_TREE)
+       update_vops = dominated_by_p (CDI_DOMINATORS, bb1, bb2);
+      else if (phi_vuse2 == NULL_TREE)
+       update_vops = dominated_by_p (CDI_DOMINATORS, bb2, bb1);
     }
 
   if (phi_vuse1 && gimple_bb (SSA_NAME_DEF_STMT (phi_vuse1)) == bb1)