public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug regression/39976]  New: [4.5 Regression] Big sixtrack degradation on powerpc 32/64 after revision r146817
@ 2009-04-30 16:25 luisgpm at linux dot vnet dot ibm dot com
  2010-07-31  9:33 ` [Bug middle-end/39976] [4.5/4.6 " rguenth at gcc dot gnu dot org
  0 siblings, 1 reply; 17+ messages in thread
From: luisgpm at linux dot vnet dot ibm dot com @ 2009-04-30 16:25 UTC (permalink / raw)
  To: gcc-bugs

We have a hot spot on sixtrack in a function called thin6d.

Such loop is generated by the old (pre-146817) gcc as a single BB, thus the
only way inside that loop is by executing instructions until we fall into that
code.

The post-146817 gcc breaks that loop in two BB's, such that we can actually
branch to the middle of that loop in the first iteration, and then the loop
runs just like in pre-146817.

The degradation comes from the fact that the creation of two BB's breaks good
scheduling of instructions inside that loop, like this:

Good code: All the fp load instructions are grouped in the upper portion of the
code.

fmul    f22,f11,f13
fmul    f23,f11,f0
addis   r12,r6,-27
lfd     f3,0(r6)
addi    r4,r6,8
lfd     f1,9472(r12)
addis   r12,r4,-27
fmadd   f8,f12,f0,f22
fmsub   f4,f12,f13,f23
lfd     f22,9472(r12)
lfd     f23,8(r6)
addi    r6,r4,8
fmul    f11,f8,f13
fmul    f24,f8,f1
fmul    f25,f8,f3
fmul    f5,f8,f0
fmadd   f11,f4,f0,f11
fmadd   f21,f4,f3,f24
fmsub   f2,f4,f1,f25
fmsub   f12,f4,f13,f5
fmul    f1,f11,f23
fmul    f8,f11,f22
fadd    f9,f9,f21
fadd    f10,f10,f2
fmsub   f24,f12,f22,f1
fmadd   f25,f12,f23,f8
fadd    f10,f10,f24
fadd    f9,f9,f25
bdnz    100ca878 <thin6d_+0x1018>

Bad code: The second pair of loads are pushed down the second BB, causing
slowdowns.

fmul    f5,f8,f0
addis   r3,r4,-27
lfd     f22,8(r7)
addi    r7,r4,8
lfd     f6,9472(r3)
fmadd   f10,f9,f0,f10
fmsub   f23,f9,f13,f5
fmul    f2,f10,f22
fmul    f9,f10,f6
fmr     f7,f23
fmsub   f25,f23,f6,f2
fmadd   f26,f23,f22,f9
fadd    f12,f12,f25
fadd    f11,f11,f26
fmul    f8,f10,f13
>> BB mark
fmul    f22,f10,f0
addis   r3,r7,-27
lfd     f21,0(r7)
addi    r4,r7,8
lfd     f25,9472(r3)
fmadd   f8,f7,f0,f8
fmsub   f9,f7,f13,f22
fmul    f23,f8,f21
fmul    f26,f8,f25
fmsub   f24,f9,f25,f23
fmadd   f7,f9,f21,f26
fadd    f12,f12,f24
fadd    f11,f11,f7
bdnz    100c9fe0 <thin6d_+0xfd0>


-- 
           Summary: [4.5 Regression] Big sixtrack degradation on powerpc
                    32/64 after revision r146817
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: regression
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: luisgpm at linux dot vnet dot ibm dot com
 GCC build triplet: powerpc*-*-*
  GCC host triplet: powerpc*-*-*
GCC target triplet: powerpc*-*-*


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


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

end of thread, other threads:[~2012-02-24  8:11 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-39976-4@http.gcc.gnu.org/bugzilla/>
2010-12-15 15:33 ` [Bug middle-end/39976] [4.5/4.6 Regression] Big sixtrack degradation on powerpc 32/64 after revision r146817 jakub at gcc dot gnu.org
2010-12-15 21:15 ` pthaugen at gcc dot gnu.org
2010-12-15 21:24 ` pthaugen at gcc dot gnu.org
2010-12-16 13:16 ` rguenth at gcc dot gnu.org
2011-04-28 15:34 ` [Bug middle-end/39976] [4.5/4.6/4.7 " rguenth at gcc dot gnu.org
2011-11-05 12:39 ` rguenth at gcc dot gnu.org
2011-11-09  0:13 ` pthaugen at gcc dot gnu.org
2011-11-17 15:22 ` wschmidt at gcc dot gnu.org
2011-11-17 15:49 ` wschmidt at gcc dot gnu.org
2011-11-17 17:12 ` matz at gcc dot gnu.org
2011-11-18 23:26 ` wschmidt at gcc dot gnu.org
2011-12-01 22:31 ` pinskia at gcc dot gnu.org
2011-12-08 22:03 ` wschmidt at gcc dot gnu.org
2011-12-08 22:16 ` wschmidt at gcc dot gnu.org
2011-12-09  9:05 ` rguenth at gcc dot gnu.org
2012-02-24  8:39 ` jiangning.liu at arm dot com
2009-04-30 16:25 [Bug regression/39976] New: [4.5 " luisgpm at linux dot vnet dot ibm dot com
2010-07-31  9:33 ` [Bug middle-end/39976] [4.5/4.6 " rguenth at gcc dot gnu dot 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).