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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@180518
138bc75d-0d04-0410-961f-
82ee72b054a4
+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
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)