]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR target/19672 (Performance regression in simple loop code)
authorPaolo Bonzini <bonzini@gnu.org>
Wed, 19 Oct 2005 10:49:56 +0000 (10:49 +0000)
committerPaolo Bonzini <bonzini@gcc.gnu.org>
Wed, 19 Oct 2005 10:49:56 +0000 (10:49 +0000)
2005-10-19  Paolo Bonzini  <bonzini@gnu.org>

PR #19672
* dojump.c (do_jump): Handle TRUTH_AND_EXPR and TRUTH_OR_EXPR
like TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR, if the branch cost
is low enough.

From-SVN: r105608

gcc/ChangeLog
gcc/dojump.c

index 6ec42feb586ac352b7b5349bec581cd38cd68e98..a21864273bd1112d612c125330014bee4df67648 100644 (file)
@@ -1,3 +1,10 @@
+2005-10-19  Paolo Bonzini  <bonzini@gnu.org>
+
+       PR #19672
+       * dojump.c (do_jump): Handle TRUTH_AND_EXPR and TRUTH_OR_EXPR
+       like TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR, if the branch cost
+       is low enough.
+
 2005-10-09  Eric Botcazou  <ebotcazou@libertysurf.fr>
 
        * config/sparc/gmon-sol2.c (internal_mcount): Mark as used.
index b232576d440ef58c04b51ac1e5f851a576c74c9b..be3df060027d224772c052b8bcb9a08ccc0d9ed3 100644 (file)
@@ -332,6 +332,12 @@ do_jump (tree exp, rtx if_false_label, rtx if_true_label)
       do_jump (TREE_OPERAND (exp, 0), if_true_label, if_false_label);
       break;
 
+    case TRUTH_AND_EXPR:
+      if (BRANCH_COST >= 4)
+        goto normal;
+
+      /* Else fall through to TRUTH_ANDIF_EXPR.  */
+
     case TRUTH_ANDIF_EXPR:
       if (if_false_label == 0)
         if_false_label = drop_through_label = gen_label_rtx ();
@@ -341,6 +347,12 @@ do_jump (tree exp, rtx if_false_label, rtx if_true_label)
       end_cleanup_deferral ();
       break;
 
+    case TRUTH_OR_EXPR:
+      if (BRANCH_COST >= 4)
+        goto normal;
+
+      /* Else fall through to TRUTH_ORIF_EXPR.  */
+
     case TRUTH_ORIF_EXPR:
       if (if_true_label == 0)
         if_true_label = drop_through_label = gen_label_rtx ();