diff options
author | Richard Guenther <rguenther@suse.de> | 2008-07-31 14:12:24 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2008-07-31 14:12:24 +0000 |
commit | 12aea97a8d4abf8c33654cc5de3c71debf3ce764 (patch) | |
tree | a58d95bb1902ad56655ad2f26bc42a410dd06917 /gcc/tree-ssa-loop-unswitch.c | |
parent | 1e0f7ffb4383cbbba0f81ca01a8ddd03a3f84620 (diff) | |
download | gcc-12aea97a8d4abf8c33654cc5de3c71debf3ce764.tar.gz |
re PR tree-optimization/36978 (ICE in gimple_cond_set_lhs for -O2 -funswitch-loops after tuples merge)
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.
From-SVN: r138415
Diffstat (limited to 'gcc/tree-ssa-loop-unswitch.c')
-rw-r--r-- | gcc/tree-ssa-loop-unswitch.c | 4 |
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 |