public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/52868] New: [4.6/4.7/4.8 Regression] 4.6 is faster on Atom
@ 2012-04-04 15:36 izamyatin at gmail dot com
  2012-04-05 10:04 ` [Bug tree-optimization/52868] [4.7/4.8 " rguenth at gcc dot gnu.org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: izamyatin at gmail dot com @ 2012-04-04 15:36 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52868

             Bug #: 52868
           Summary: [4.6/4.7/4.8 Regression] 4.6 is faster on Atom
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: izamyatin@gmail.com
            Target: i386


Created attachment 27090
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=27090
Testcase

For attached case 4.6 is ~10% faster than 4.7 and trunk.

IVopts works differently and it leads to performance degradation

THis is possibly related to http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52272

Command line to reproduce:
-O2 -march=atom -m32 -mtune=atom -msse2 -static


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug tree-optimization/52868] [4.7/4.8 Regression] 4.6 is faster on Atom
  2012-04-04 15:36 [Bug tree-optimization/52868] New: [4.6/4.7/4.8 Regression] 4.6 is faster on Atom izamyatin at gmail dot com
@ 2012-04-05 10:04 ` rguenth at gcc dot gnu.org
  2012-04-13 13:20 ` rguenth at gcc dot gnu.org
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-04-05 10:04 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52868

Richard Guenther <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Depends on|                            |52272
   Target Milestone|---                         |4.7.1
            Summary|[4.6/4.7/4.8 Regression]    |[4.7/4.8 Regression] 4.6 is
                   |4.6 is faster on Atom       |faster on Atom


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug tree-optimization/52868] [4.7/4.8 Regression] 4.6 is faster on Atom
  2012-04-04 15:36 [Bug tree-optimization/52868] New: [4.6/4.7/4.8 Regression] 4.6 is faster on Atom izamyatin at gmail dot com
  2012-04-05 10:04 ` [Bug tree-optimization/52868] [4.7/4.8 " rguenth at gcc dot gnu.org
@ 2012-04-13 13:20 ` rguenth at gcc dot gnu.org
  2012-04-19 13:09 ` izamyatin at gmail dot com
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-04-13 13:20 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52868

Richard Guenther <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P2


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug tree-optimization/52868] [4.7/4.8 Regression] 4.6 is faster on Atom
  2012-04-04 15:36 [Bug tree-optimization/52868] New: [4.6/4.7/4.8 Regression] 4.6 is faster on Atom izamyatin at gmail dot com
  2012-04-05 10:04 ` [Bug tree-optimization/52868] [4.7/4.8 " rguenth at gcc dot gnu.org
  2012-04-13 13:20 ` rguenth at gcc dot gnu.org
@ 2012-04-19 13:09 ` izamyatin at gmail dot com
  2012-06-14  8:36 ` rguenth at gcc dot gnu.org
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: izamyatin at gmail dot com @ 2012-04-19 13:09 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52868

--- Comment #1 from Igor Zamyatin <izamyatin at gmail dot com> 2012-04-19 13:09:07 UTC ---
Experimental patch that fixes the regression:

diff --git a/gcc/tree-ssa-loop-ivopts.c b/gcc/tree-ssa-loop-ivopts.c
index 3c11c0e..9c04516 100644
--- a/gcc/tree-ssa-loop-ivopts.c
+++ b/gcc/tree-ssa-loop-ivopts.c
@@ -4112,6 +4112,7 @@ get_computation_cost_at (struct ivopts_data *data,
   else if (ratio == 1)
     {
       tree real_cbase = cbase;
+      int diff_cost, add_cost_val;

       /* Check to see if any adjustment is needed.  */
       if (cstepi == 0 && stmt_is_after_inc)
@@ -4131,7 +4132,19 @@ get_computation_cost_at (struct ivopts_data *data,
                              ubase, real_cbase,
                              &symbol_present, &var_present, &offset,
                              depends_on);
+      diff_cost = cost.cost;
       cost.cost /= avg_loop_niter (data->current_loop);
+      add_cost_val = add_cost (TYPE_MODE (ctype), data->speed);
+      /* do cost correction if address cost is small enough
+         and difference cost is high enough */
+      if (address_p && diff_cost > add_cost_val
+          && get_address_cost (symbol_present, var_present,
+                               offset, ratio, cstepi,
+                               TYPE_MODE (TREE_TYPE (utype)),
+                               TYPE_ADDR_SPACE (TREE_TYPE (utype)),
+                               speed, stmt_is_after_inc,
+                               can_autoinc).cost <= add_cost_val)
+        cost.cost += add_cost_val;
     }
   else if (address_p
           && !POINTER_TYPE_P (ctype)



It also fixes the bwaves regression from
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52272


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug tree-optimization/52868] [4.7/4.8 Regression] 4.6 is faster on Atom
  2012-04-04 15:36 [Bug tree-optimization/52868] New: [4.6/4.7/4.8 Regression] 4.6 is faster on Atom izamyatin at gmail dot com
                   ` (2 preceding siblings ...)
  2012-04-19 13:09 ` izamyatin at gmail dot com
@ 2012-06-14  8:36 ` rguenth at gcc dot gnu.org
  2012-09-20 10:23 ` jakub at gcc dot gnu.org
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-06-14  8:36 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52868

Richard Guenther <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.7.1                       |4.7.2

--- Comment #2 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-06-14 08:35:35 UTC ---
GCC 4.7.1 is being released, adjusting target milestone.


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug tree-optimization/52868] [4.7/4.8 Regression] 4.6 is faster on Atom
  2012-04-04 15:36 [Bug tree-optimization/52868] New: [4.6/4.7/4.8 Regression] 4.6 is faster on Atom izamyatin at gmail dot com
                   ` (3 preceding siblings ...)
  2012-06-14  8:36 ` rguenth at gcc dot gnu.org
@ 2012-09-20 10:23 ` jakub at gcc dot gnu.org
  2013-02-07 16:13 ` aldyh at gcc dot gnu.org
  2013-02-09 19:15 ` aldyh at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-09-20 10:23 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52868

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.7.2                       |4.7.3

--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-09-20 10:19:42 UTC ---
GCC 4.7.2 has been released.


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug tree-optimization/52868] [4.7/4.8 Regression] 4.6 is faster on Atom
  2012-04-04 15:36 [Bug tree-optimization/52868] New: [4.6/4.7/4.8 Regression] 4.6 is faster on Atom izamyatin at gmail dot com
                   ` (4 preceding siblings ...)
  2012-09-20 10:23 ` jakub at gcc dot gnu.org
@ 2013-02-07 16:13 ` aldyh at gcc dot gnu.org
  2013-02-09 19:15 ` aldyh at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: aldyh at gcc dot gnu.org @ 2013-02-07 16:13 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52868

Aldy Hernandez <aldyh at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |WAITING
   Last reconfirmed|                            |2013-02-07
                 CC|                            |aldyh at gcc dot gnu.org
     Ever Confirmed|0                           |1

--- Comment #4 from Aldy Hernandez <aldyh at gcc dot gnu.org> 2013-02-07 16:11:34 UTC ---
Isn't this a duplicate of PR 52272?  That is, fixing 52272, along with the
410.bwaves regressions, also fixes this PR?

Can we close this as a duplicate?


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug tree-optimization/52868] [4.7/4.8 Regression] 4.6 is faster on Atom
  2012-04-04 15:36 [Bug tree-optimization/52868] New: [4.6/4.7/4.8 Regression] 4.6 is faster on Atom izamyatin at gmail dot com
                   ` (5 preceding siblings ...)
  2013-02-07 16:13 ` aldyh at gcc dot gnu.org
@ 2013-02-09 19:15 ` aldyh at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: aldyh at gcc dot gnu.org @ 2013-02-09 19:15 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52868

Aldy Hernandez <aldyh at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |RESOLVED
         Resolution|                            |DUPLICATE

--- Comment #5 from Aldy Hernandez <aldyh at gcc dot gnu.org> 2013-02-09 19:15:15 UTC ---


*** This bug has been marked as a duplicate of bug 52272 ***


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2013-02-09 19:15 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-04 15:36 [Bug tree-optimization/52868] New: [4.6/4.7/4.8 Regression] 4.6 is faster on Atom izamyatin at gmail dot com
2012-04-05 10:04 ` [Bug tree-optimization/52868] [4.7/4.8 " rguenth at gcc dot gnu.org
2012-04-13 13:20 ` rguenth at gcc dot gnu.org
2012-04-19 13:09 ` izamyatin at gmail dot com
2012-06-14  8:36 ` rguenth at gcc dot gnu.org
2012-09-20 10:23 ` jakub at gcc dot gnu.org
2013-02-07 16:13 ` aldyh at gcc dot gnu.org
2013-02-09 19:15 ` aldyh at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).