expr.c (expand_expr_real_2): Re-cost if previous costs are the same.
2017-04-26 Tamar Christina <tamar.christina@arm.com> * expr.c (expand_expr_real_2): Re-cost if previous costs are the same. From-SVN: r247505
This commit is contained in:
parent
cc5b8f3d56
commit
22677ff0c4
2 changed files with 13 additions and 0 deletions
|
@ -1,3 +1,7 @@
|
|||
2017-04-26 Tamar Christina <tamar.christina@arm.com>
|
||||
|
||||
* expr.c (expand_expr_real_2): Re-cost if previous costs are the same.
|
||||
|
||||
2017-04-27 Tamar Christina <tamar.christina@arm.com>
|
||||
|
||||
* simplify-rtx.c (simplify_binary_operation_1): Add LSHIFTRT case.
|
||||
|
|
|
@ -8838,6 +8838,15 @@ expand_expr_real_2 (sepops ops, rtx target, machine_mode tmode,
|
|||
end_sequence ();
|
||||
unsigned uns_cost = seq_cost (uns_insns, speed_p);
|
||||
unsigned sgn_cost = seq_cost (sgn_insns, speed_p);
|
||||
|
||||
/* If costs are the same then use as tie breaker the other
|
||||
other factor. */
|
||||
if (uns_cost == sgn_cost)
|
||||
{
|
||||
uns_cost = seq_cost (uns_insns, !speed_p);
|
||||
sgn_cost = seq_cost (sgn_insns, !speed_p);
|
||||
}
|
||||
|
||||
if (uns_cost < sgn_cost || (uns_cost == sgn_cost && unsignedp))
|
||||
{
|
||||
emit_insn (uns_insns);
|
||||
|
|
Loading…
Add table
Reference in a new issue