From: Paolo Bonzini Date: Wed, 19 Oct 2005 10:49:56 +0000 (+0000) Subject: re PR target/19672 (Performance regression in simple loop code) X-Git-Tag: releases/gcc-3.4.5~136 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=447afba80f2083e939f388c3bfa755442197b78b;p=thirdparty%2Fgcc.git re PR target/19672 (Performance regression in simple loop code) 2005-10-19 Paolo Bonzini 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 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 6ec42feb586a..a21864273bd1 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2005-10-19 Paolo Bonzini + + 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 * config/sparc/gmon-sol2.c (internal_mcount): Mark as used. diff --git a/gcc/dojump.c b/gcc/dojump.c index b232576d440e..be3df060027d 100644 --- a/gcc/dojump.c +++ b/gcc/dojump.c @@ -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 ();