summaryrefslogtreecommitdiff
path: root/gcc/tree-if-conv.c
diff options
context:
space:
mode:
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2012-04-16 11:03:16 +0000
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2012-04-16 11:03:16 +0000
commit06734da8d7e6f650da5a652c933eb8095f8d6133 (patch)
treee0d0e98c8ce375e15c7f970bb865d04058a3c444 /gcc/tree-if-conv.c
parent0e89ecb3bf90d8f86dde285e43e5fd0b9bdeda7c (diff)
downloadgcc-06734da8d7e6f650da5a652c933eb8095f8d6133.tar.gz
2012-04-16 Richard Guenther <rguenther@suse.de>
PR tree-optimization/52975 * tree-if-conv.c (predicate_bbs): Do not simplify inverted condition but always mark it with TRUTH_NOT_EXPR. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@186491 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-if-conv.c')
-rw-r--r--gcc/tree-if-conv.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/gcc/tree-if-conv.c b/gcc/tree-if-conv.c
index c86a4aa55bb..31bb610af08 100644
--- a/gcc/tree-if-conv.c
+++ b/gcc/tree-if-conv.c
@@ -968,7 +968,7 @@ predicate_bbs (loop_p loop)
case GIMPLE_COND:
{
- tree c2, tem;
+ tree c2;
edge true_edge, false_edge;
location_t loc = gimple_location (stmt);
tree c = fold_build2_loc (loc, gimple_cond_code (stmt),
@@ -986,10 +986,8 @@ predicate_bbs (loop_p loop)
unshare_expr (c));
/* If C is false, then FALSE_EDGE is taken. */
- c2 = invert_truthvalue_loc (loc, unshare_expr (c));
- tem = canonicalize_cond_expr_cond (c2);
- if (tem)
- c2 = tem;
+ c2 = build1_loc (loc, TRUTH_NOT_EXPR,
+ boolean_type_node, unshare_expr (c));
add_to_dst_predicate_list (loop, false_edge,
unshare_expr (cond), c2);