aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-ifcombine.c
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2007-10-04 09:37:04 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2007-10-04 09:37:04 +0000
commitdc5752338ba869ec407f1d97b0d47793be431239 (patch)
treee796856d793e5691b916e4fbbedc157a8e3dce8b /gcc/tree-ssa-ifcombine.c
parent65567efaa82178fcfe63bee2c81f06a541cd72a4 (diff)
downloadgcc-dc5752338ba869ec407f1d97b0d47793be431239.zip
gcc-dc5752338ba869ec407f1d97b0d47793be431239.tar.gz
gcc-dc5752338ba869ec407f1d97b0d47793be431239.tar.bz2
re PR tree-optimization/33627 (ICE in verify_stmts compiling abiword)
2007-10-04 Richard Guenther <rguenther@suse.de> PR tree-optimization/33627 * tree-gimple.h (canonicalize_cond_expr_cond): Declare. * tree-gimple.c (canonicalize_cond_expr_cond): New function, split out from ... * tree-ssa-forwprop.c (combine_cond_expr_cond): ... here. * tree-ssa-ifcombine.c (ifcombine_iforif): Use it. * g++.dg/torture/pr33627.C: New testcase. From-SVN: r129004
Diffstat (limited to 'gcc/tree-ssa-ifcombine.c')
-rw-r--r--gcc/tree-ssa-ifcombine.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/tree-ssa-ifcombine.c b/gcc/tree-ssa-ifcombine.c
index f52585c..eef6f22 100644
--- a/gcc/tree-ssa-ifcombine.c
+++ b/gcc/tree-ssa-ifcombine.c
@@ -483,6 +483,9 @@ ifcombine_iforif (basic_block inner_cond_bb, basic_block outer_cond_bb)
/* Do it. */
t = fold_build2 (code, boolean_type_node,
TREE_OPERAND (ccond2, 0), TREE_OPERAND (ccond2, 1));
+ t = canonicalize_cond_expr_cond (t);
+ if (!t)
+ return false;
COND_EXPR_COND (inner_cond) = t;
update_stmt (inner_cond);