This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [4.1/4.0/3.4] fix pr19672 by tuning expansion of TRUTH_{AND,OR}_EXPR



If it goes into 4.0, then OK for 3.4.x too.

This is the patch I committed on 3.4. The TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR cases were cleaned up after the tree-ssa merge, but are still present there.


diff -u -r1.9.4.2 dojump.c
--- dojump.c    14 Dec 2004 01:47:30 -0000      1.9.4.2
+++ dojump.c    19 Oct 2005 10:46:07 -0000
@@ -332,6 +332,12 @@
       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 @@
       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 ();

Paolo


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]