diff options
author | Tom de Vries <tom@codesourcery.com> | 2011-10-26 09:33:49 +0000 |
---|---|---|
committer | Tom de Vries <vries@gcc.gnu.org> | 2011-10-26 09:33:49 +0000 |
commit | 9e1d5f491f78069261227aa55ce43879e427c51a (patch) | |
tree | ec25272bcb6699579a63549badd1b3b7e0da1fb9 /gcc | |
parent | f31c0018872d05b9fbdf6134a5d76838da4db4dc (diff) | |
download | gcc-9e1d5f491f78069261227aa55ce43879e427c51a.zip gcc-9e1d5f491f78069261227aa55ce43879e427c51a.tar.gz gcc-9e1d5f491f78069261227aa55ce43879e427c51a.tar.bz2 |
re PR tree-optimization/50763 (ICE: verify_gimple failed: missing PHI def with -ftree-tail-merge)
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
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/tree-ssa-tail-merge.c | 7 |
2 files changed, 12 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index a54e949..1a09dcc 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -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 diff --git a/gcc/tree-ssa-tail-merge.c b/gcc/tree-ssa-tail-merge.c index f7b2f52..eb4bc92 100644 --- a/gcc/tree-ssa-tail-merge.c +++ b/gcc/tree-ssa-tail-merge.c @@ -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) |