public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/57309] New: Spill code degrades vectorized loop for 437.leslie3d on PPC64
@ 2013-05-17  3:06 wschmidt at gcc dot gnu.org
  2013-05-17  8:42 ` [Bug target/57309] " rguenth at gcc dot gnu.org
  2013-05-17 11:58 ` wschmidt at gcc dot gnu.org
  0 siblings, 2 replies; 3+ messages in thread
From: wschmidt at gcc dot gnu.org @ 2013-05-17  3:06 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 57309
           Summary: Spill code degrades vectorized loop for 437.leslie3d
                    on PPC64
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Keywords: missed-optimization
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: wschmidt at gcc dot gnu.org
                CC: bergner at vnet dot ibm.com
              Host: powerpc*-*-*
            Target: powerpc*-*-*
             Build: powerpc*-*-*

Note: This bug does NOT occur on current trunk.

To reproduce, it's necessary to patch config/rs6000/rs6000.h so that
MALLOC_ABI_ALIGNMENT is defined as:

#define MALLOC_ABI_ALIGNMENT (TARGET_64BIT ? 128 : 64)

This allows more vectorization opportunities for loops that access malloc'd
arrays that can be vectorized with 128-bit vectors.

I observed that making this change introduces a degradation of SPEC CPU2006
437.leslie3d, built for 64-bit PowerPC Linux.  There are a number of degraded
loops in the code, which seem to all be pretty similar.  In all cases the loops
are vectorized with and without the patch, but with the patch there is no need
for prolog code to align the data.  Unfortunately, with the patch, the loops
also contain a great deal of spill code (ld, addi, lxvd2x, stxvd2x) which
reloads not only vector registers, but also GPRs used for address computation
of vector loads and stores.  Without the spill code, the main loop body would
be vectorized identically with and without the patch.

One of the worst degraded loops is in function fluxk.  I have oprofile data
available to identify the loop as well as some dumps showing how the loop is
transformed in various phases, available by request.


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

* [Bug target/57309] Spill code degrades vectorized loop for 437.leslie3d on PPC64
  2013-05-17  3:06 [Bug target/57309] New: Spill code degrades vectorized loop for 437.leslie3d on PPC64 wschmidt at gcc dot gnu.org
@ 2013-05-17  8:42 ` rguenth at gcc dot gnu.org
  2013-05-17 11:58 ` wschmidt at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: rguenth at gcc dot gnu.org @ 2013-05-17  8:42 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
Can you isolate a testcase for the worst loop?


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

* [Bug target/57309] Spill code degrades vectorized loop for 437.leslie3d on PPC64
  2013-05-17  3:06 [Bug target/57309] New: Spill code degrades vectorized loop for 437.leslie3d on PPC64 wschmidt at gcc dot gnu.org
  2013-05-17  8:42 ` [Bug target/57309] " rguenth at gcc dot gnu.org
@ 2013-05-17 11:58 ` wschmidt at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: wschmidt at gcc dot gnu.org @ 2013-05-17 11:58 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Bill Schmidt <wschmidt at gcc dot gnu.org> ---
(In reply to Richard Biener from comment #1)
> Can you isolate a testcase for the worst loop?

Not yet.  It's one of these horrible gargantuan functions (leslie3d is one big
file and fluxi, fluxj, fluxk are all quite large functions) and the issue
appears to involve global register allocation, so it will be sensitive to
control flow changes.  Not an easy thing to attack with delta, either.

Peter is planning to look at this at some point, and I have a bunch of dump
files saved away to help with the analysis.  Not sure what else to do for now.


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

end of thread, other threads:[~2013-05-17 11:58 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-17  3:06 [Bug target/57309] New: Spill code degrades vectorized loop for 437.leslie3d on PPC64 wschmidt at gcc dot gnu.org
2013-05-17  8:42 ` [Bug target/57309] " rguenth at gcc dot gnu.org
2013-05-17 11:58 ` wschmidt 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).