From 6c66f73369dacc9889cfaa05f8a08813e7c45f1f Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Fri, 20 May 2011 16:19:05 +0200 Subject: 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 --- gcc/tree-ssa-ifcombine.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'gcc/tree-ssa-ifcombine.c') 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 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) { -- cgit v1.2.1