summaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-loop-unswitch.c
diff options
context:
space:
mode:
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2008-07-31 14:12:24 +0000
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2008-07-31 14:12:24 +0000
commita92910ae13f63d21d194bada3ae904a305d87bd8 (patch)
treea58d95bb1902ad56655ad2f26bc42a410dd06917 /gcc/tree-ssa-loop-unswitch.c
parent3830fb74edab75fe9dd5bc384fcaacdde9b69afb (diff)
downloadgcc-a92910ae13f63d21d194bada3ae904a305d87bd8.tar.gz
2008-07-31 Richard Guenther <rguenther@suse.de>
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@138415 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-ssa-loop-unswitch.c')
-rw-r--r--gcc/tree-ssa-loop-unswitch.c4
1 files changed, 2 insertions, 2 deletions
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