re PR tree-optimization/52975 (Ofast produces not optimized code for vectorized ...
authorRichard Guenther <rguenther@suse.de>
Mon, 16 Apr 2012 11:03:16 +0000 (11:03 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Mon, 16 Apr 2012 11:03:16 +0000 (11:03 +0000)
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.

From-SVN: r186491

gcc/ChangeLog
gcc/tree-if-conv.c

index 5ae727b8374b0d7ab51e4bd4e936671210914d88..173dfee8ac833fa6d44f8da086c57a27e077bf63 100644 (file)
@@ -1,3 +1,9 @@
+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.
 2012-04-16  Richard Guenther  <rguenther@suse.de>
 
        PR tree-optimization/52975
index c86a4aa55bb8554923b85c9137bc50ccf5c32c95..31bb610af08c44617fa9ea1a6d70dd5b17f9bf9d 100644 (file)
@@ -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);