diff options
author | Jakub Jelinek <jakub@redhat.com> | 2011-05-20 16:19:05 +0200 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2011-05-20 16:19:05 +0200 |
commit | 6c66f73369dacc9889cfaa05f8a08813e7c45f1f (patch) | |
tree | 940cae516f3f04771fe6a0abd862dd3ee83bd9da /gcc/tree-ssa-ifcombine.c | |
parent | 57b4d355a187943b042ca3e9a86bccf74c0e0d84 (diff) | |
download | gcc-6c66f73369dacc9889cfaa05f8a08813e7c45f1f.tar.gz |
re PR tree-optimization/49073 (g++ optimizer breaks do-while code)
PR tree-optimization/49073
* gimple-fold.c (and_comparisons_1, or_comparisons_1): Return
NULL if PHI argument is SSA_NAME, whose def_stmt is dominated
by the PHI.
* tree-ssa-ifcombine.c (tree_ssa_ifcombine): Calculate dominators.
* gcc.c-torture/execute/pr49073.c: New test.
From-SVN: r173948
Diffstat (limited to 'gcc/tree-ssa-ifcombine.c')
-rw-r--r-- | gcc/tree-ssa-ifcombine.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/tree-ssa-ifcombine.c b/gcc/tree-ssa-ifcombine.c index e23bb763d19..9063bfdcd55 100644 --- a/gcc/tree-ssa-ifcombine.c +++ b/gcc/tree-ssa-ifcombine.c @@ -1,5 +1,5 @@ /* Combining of if-expressions on trees. - Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc. + Copyright (C) 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc. Contributed by Richard Guenther <rguenther@suse.de> This file is part of GCC. @@ -625,6 +625,7 @@ tree_ssa_ifcombine (void) int i; bbs = blocks_in_phiopt_order (); + calculate_dominance_info (CDI_DOMINATORS); for (i = 0; i < n_basic_blocks - NUM_FIXED_BLOCKS; ++i) { |