From 12aea97a8d4abf8c33654cc5de3c71debf3ce764 Mon Sep 17 00:00:00 2001 From: Richard Guenther Date: Thu, 31 Jul 2008 14:12:24 +0000 Subject: re PR tree-optimization/36978 (ICE in gimple_cond_set_lhs for -O2 -funswitch-loops after tuples merge) 2008-07-31 Richard Guenther PR tree-optimization/36978 * tree-ssa-loop-unswitch.c (tree_may_unswitch_on): Do not fold the generated condition. * gcc.dg/torture/pr36978.c: New testcase. From-SVN: r138415 --- gcc/tree-ssa-loop-unswitch.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gcc/tree-ssa-loop-unswitch.c') diff --git a/gcc/tree-ssa-loop-unswitch.c b/gcc/tree-ssa-loop-unswitch.c index 8ece4aca4ab..850270f49c0 100644 --- a/gcc/tree-ssa-loop-unswitch.c +++ b/gcc/tree-ssa-loop-unswitch.c @@ -123,8 +123,8 @@ tree_may_unswitch_on (basic_block bb, struct loop *loop) return NULL_TREE; } - cond = fold_build2 (gimple_cond_code (stmt), boolean_type_node, - gimple_cond_lhs (stmt), gimple_cond_rhs (stmt)); + cond = build2 (gimple_cond_code (stmt), boolean_type_node, + gimple_cond_lhs (stmt), gimple_cond_rhs (stmt)); /* To keep the things simple, we do not directly remove the conditions, but just replace tests with 0/1. Prevent the infinite loop where we -- cgit v1.2.1