re PR target/19672 (Performance regression in simple loop code)
2005-10-18 Paolo Bonzini <bonzini@gnu.org> PR #19672 * dojump.c (do_jump): Handle TRUTH_AND_EXPR and TRUTH_OR_EXPR here. From-SVN: r105606
This commit is contained in:
parent
2cdc88b64d
commit
d1f36c51be
|
@ -1,3 +1,8 @@
|
||||||
|
2005-10-18 Paolo Bonzini <bonzini@gnu.org>
|
||||||
|
|
||||||
|
PR #19672
|
||||||
|
* dojump.c (do_jump): Handle TRUTH_AND_EXPR and TRUTH_OR_EXPR here.
|
||||||
|
|
||||||
2005-10-18 Daniel Berlin <dberlin@dberlin.org>
|
2005-10-18 Daniel Berlin <dberlin@dberlin.org>
|
||||||
|
|
||||||
Fix PR tree-optimization/24231
|
Fix PR tree-optimization/24231
|
||||||
|
@ -5,7 +10,7 @@
|
||||||
* tree-ssa-pre.c (try_look_through_load): Skip abnormal phi names
|
* tree-ssa-pre.c (try_look_through_load): Skip abnormal phi names
|
||||||
(compute_avail): Ditto.
|
(compute_avail): Ditto.
|
||||||
|
|
||||||
2006-10-18 Richard Henderson <rth@redhat.com>
|
2005-10-18 Richard Henderson <rth@redhat.com>
|
||||||
|
|
||||||
PR target/24428
|
PR target/24428
|
||||||
* config/i386/i386.c (legitimate_constant_p): Check
|
* config/i386/i386.c (legitimate_constant_p): Check
|
||||||
|
|
38
gcc/dojump.c
38
gcc/dojump.c
|
@ -510,6 +510,42 @@ do_jump (tree exp, rtx if_false_label, rtx if_true_label)
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case TRUTH_AND_EXPR:
|
||||||
|
/* High branch cost, expand as the bitwise AND of the conditions. */
|
||||||
|
if (BRANCH_COST >= 4)
|
||||||
|
goto normal;
|
||||||
|
|
||||||
|
if (if_false_label == NULL_RTX)
|
||||||
|
{
|
||||||
|
drop_through_label = gen_label_rtx ();
|
||||||
|
do_jump (TREE_OPERAND (exp, 0), drop_through_label, NULL_RTX);
|
||||||
|
do_jump (TREE_OPERAND (exp, 1), NULL_RTX, if_true_label);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
do_jump (TREE_OPERAND (exp, 0), if_false_label, NULL_RTX);
|
||||||
|
do_jump (TREE_OPERAND (exp, 1), if_false_label, if_true_label);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case TRUTH_OR_EXPR:
|
||||||
|
/* High branch cost, expand as the bitwise OR of the conditions. */
|
||||||
|
if (BRANCH_COST >= 4)
|
||||||
|
goto normal;
|
||||||
|
|
||||||
|
if (if_true_label == NULL_RTX)
|
||||||
|
{
|
||||||
|
drop_through_label = gen_label_rtx ();
|
||||||
|
do_jump (TREE_OPERAND (exp, 0), NULL_RTX, drop_through_label);
|
||||||
|
do_jump (TREE_OPERAND (exp, 1), if_false_label, NULL_RTX);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
do_jump (TREE_OPERAND (exp, 0), NULL_RTX, if_true_label);
|
||||||
|
do_jump (TREE_OPERAND (exp, 1), if_false_label, if_true_label);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
/* Special case:
|
/* Special case:
|
||||||
__builtin_expect (<test>, 0) and
|
__builtin_expect (<test>, 0) and
|
||||||
__builtin_expect (<test>, 1)
|
__builtin_expect (<test>, 1)
|
||||||
|
@ -540,8 +576,8 @@ do_jump (tree exp, rtx if_false_label, rtx if_true_label)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Fall through and generate the normal code. */
|
/* Fall through and generate the normal code. */
|
||||||
|
|
||||||
default:
|
default:
|
||||||
normal:
|
normal:
|
||||||
temp = expand_expr (exp, NULL_RTX, VOIDmode, 0);
|
temp = expand_expr (exp, NULL_RTX, VOIDmode, 0);
|
||||||
|
|
Loading…
Reference in New Issue