Commit 68ca4ac9 by Thomas Preud'homme Committed by Thomas Preud'homme

re PR middle-end/63743 (Thumb1: big regression for float operators by r216728)

2015-03-09  Thomas Preud'homme  <thomas.preudhomme@arm.com>

    gcc/
    PR tree-optimization/63743
    * cfgexpand.c (reorder_operands): Also reorder if only second operand
    had its definition forwarded by TER.

    gcc/testsuite/
    PR tree-optimization/63743
    * gcc.dg/pr63743.c: New test.

From-SVN: r221276
parent 609570b4
2015-03-09 Thomas Preud'homme <thomas.preudhomme@arm.com>
PR tree-optimization/63743
* cfgexpand.c (reorder_operands): Also reorder if only second operand
had its definition forwarded by TER.
2015-03-08 Jan Hubicka <hubicka@ucw.cz> 2015-03-08 Jan Hubicka <hubicka@ucw.cz>
PR lto/65316 PR lto/65316
......
...@@ -5124,13 +5124,11 @@ reorder_operands (basic_block bb) ...@@ -5124,13 +5124,11 @@ reorder_operands (basic_block bb)
continue; continue;
/* Swap operands if the second one is more expensive. */ /* Swap operands if the second one is more expensive. */
def0 = get_gimple_for_ssa_name (op0); def0 = get_gimple_for_ssa_name (op0);
if (!def0)
continue;
def1 = get_gimple_for_ssa_name (op1); def1 = get_gimple_for_ssa_name (op1);
if (!def1) if (!def1)
continue; continue;
swap = false; swap = false;
if (lattice[gimple_uid (def1)] > lattice[gimple_uid (def0)]) if (!def0 || lattice[gimple_uid (def1)] > lattice[gimple_uid (def0)])
swap = true; swap = true;
if (swap) if (swap)
{ {
...@@ -5139,7 +5137,7 @@ reorder_operands (basic_block bb) ...@@ -5139,7 +5137,7 @@ reorder_operands (basic_block bb)
fprintf (dump_file, "Swap operands in stmt:\n"); fprintf (dump_file, "Swap operands in stmt:\n");
print_gimple_stmt (dump_file, stmt, 0, TDF_SLIM); print_gimple_stmt (dump_file, stmt, 0, TDF_SLIM);
fprintf (dump_file, "Cost left opnd=%d, right opnd=%d\n", fprintf (dump_file, "Cost left opnd=%d, right opnd=%d\n",
lattice[gimple_uid (def0)], def0 ? lattice[gimple_uid (def0)] : 0,
lattice[gimple_uid (def1)]); lattice[gimple_uid (def1)]);
} }
swap_ssa_operands (stmt, gimple_assign_rhs1_ptr (stmt), swap_ssa_operands (stmt, gimple_assign_rhs1_ptr (stmt),
......
2015-03-09 Thomas Preud'homme <thomas.preudhomme@arm.com>
PR tree-optimization/63743
* gcc.dg/pr63743.c: New test.
2015-03-08 Jan Hubicka <hubicka@ucw.cz> 2015-03-08 Jan Hubicka <hubicka@ucw.cz>
PR lto/65316 PR lto/65316
......
/* { dg-do compile } */
/* { dg-options "-O1 -fdump-rtl-expand-details" } */
double
libcall_dep (double x, double y)
{
return x * (x + y);
}
/* { dg-final { scan-rtl-dump-times "Swap operands" 1 "expand" } } */
/* { dg-final { cleanup-rtl-dump "expand" } } */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment