public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/50557] New: [4.7 Regression] Register pressure increase after reassociation (x86, 32 bits)
@ 2011-09-28 11:08 izamyatin at gmail dot com
  2011-09-28 11:51 ` [Bug tree-optimization/50557] " rguenth at gcc dot gnu.org
                   ` (19 more replies)
  0 siblings, 20 replies; 21+ messages in thread
From: izamyatin at gmail dot com @ 2011-09-28 11:08 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 50557
           Summary: [4.7 Regression] Register pressure increase after
                    reassociation (x86, 32 bits)
    Classification: Unclassified
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: izamyatin@gmail.com


After the fix for http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49749
(http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=176984) I observed a
degradation for the attached test. (~9% on Core)
Before the fix RA managed to use registers for code related to line #30. After
the fix an order of operations has been changed and this apparently led to
change in live ranges and hence to increased register pressure.

Asm snippet for fast case

        # 4long.c:30
        .loc 1 30 0
        movl    8(%ecx), %esi
        xorl    %edi, %edi
        addl    %eax, %esi
        movl    52(%esp), %eax
        adcl    %edx, %edi
        mull    8(%ebp)
        addl    %eax, %esi
        adcl    %edx, %edi

Asm snippet for slow case

# 4long.c:30
        .loc 1 30 0
        movl    52(%esp), %eax
        mull    8(%ebp)
        movl    %eax, (%esp)
        movl    8(%ecx), %eax
        movl    %edx, 4(%esp)
        xorl    %edx, %edx
        addl    %eax, (%esp)
        adcl    %edx, 4(%esp)
        addl    %esi, (%esp)
        adcl    %edi, 4(%esp)

gcc is:
Target: x86_64-unknown-linux-gnu
Configured with: ../configure --disable-bootstrap --enable-languages=c,c++
--prefix=/export/users/izamyati/build/
Thread model: posix
gcc version 4.7.0 20110731 (experimental) (GCC) 

Compilation flags:
-O2 -mssse3 -mfpmath=sse -ffast-math -m32


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

end of thread, other threads:[~2014-06-12 13:02 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-28 11:08 [Bug tree-optimization/50557] New: [4.7 Regression] Register pressure increase after reassociation (x86, 32 bits) izamyatin at gmail dot com
2011-09-28 11:51 ` [Bug tree-optimization/50557] " rguenth at gcc dot gnu.org
2011-09-28 12:17 ` izamyatin at gmail dot com
2011-09-28 12:27 ` wschmidt at gcc dot gnu.org
2011-09-29  9:32 ` izamyatin at gmail dot com
2011-09-29 12:25 ` wschmidt at gcc dot gnu.org
2011-09-30 14:52 ` wschmidt at gcc dot gnu.org
2011-10-07 10:34 ` izamyatin at gmail dot com
2011-10-10 12:40 ` wschmidt at gcc dot gnu.org
2011-10-27 10:30 ` [Bug rtl-optimization/50557] " rguenth at gcc dot gnu.org
2011-12-05 10:46 ` steven at gcc dot gnu.org
2011-12-07  4:02 ` pinskia at gcc dot gnu.org
2012-01-19 12:52 ` rguenth at gcc dot gnu.org
2012-02-27 10:35 ` rguenth at gcc dot gnu.org
2012-03-22  9:23 ` [Bug rtl-optimization/50557] [4.7/4.8 " rguenth at gcc dot gnu.org
2012-06-14  8:41 ` rguenth at gcc dot gnu.org
2012-09-20 10:24 ` jakub at gcc dot gnu.org
2012-10-04 11:17 ` izamyatin at gmail dot com
2013-01-01  5:26 ` [Bug rtl-optimization/50557] [4.7 " pinskia at gcc dot gnu.org
2013-04-11  7:59 ` rguenth at gcc dot gnu.org
2014-06-12 13:02 ` rguenth 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).