public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/44185]  New: [4.6 regression] New prefetch test failures
@ 2010-05-18  2:40 hjl dot tools at gmail dot com
  2010-05-18  7:29 ` [Bug middle-end/44185] " hjl dot tools at gmail dot com
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: hjl dot tools at gmail dot com @ 2010-05-18  2:40 UTC (permalink / raw)
  To: gcc-bugs

On Linux/ia32, revision 159516 gave:

FAIL: gcc.dg/tree-ssa/prefetch-6.c scan-assembler-times prefetcht 5
FAIL: gcc.dg/tree-ssa/prefetch-6.c scan-tree-dump-times aprefetch "Issued
prefetch" 5
FAIL: gcc.dg/tree-ssa/prefetch-7.c scan-assembler-times mfence 2
FAIL: gcc.dg/tree-ssa/prefetch-7.c scan-assembler-times movnti 2
FAIL: gcc.dg/tree-ssa/prefetch-7.c scan-assembler-times prefetchnta 2
FAIL: gcc.dg/tree-ssa/prefetch-7.c scan-assembler-times prefetcht 1
FAIL: gcc.dg/tree-ssa/prefetch-7.c scan-assembler-times prefetchw 5
FAIL: gcc.dg/tree-ssa/prefetch-7.c scan-tree-dump-times aprefetch "Issued
nontemporal prefetch" 3
FAIL: gcc.dg/tree-ssa/prefetch-7.c scan-tree-dump-times aprefetch "Issued
prefetch" 5
FAIL: gcc.dg/tree-ssa/prefetch-7.c scan-tree-dump-times aprefetch "a
nontemporal store" 2
FAIL: gcc.dg/tree-ssa/prefetch-7.c scan-tree-dump-times optimized "={nt}" 2
FAIL: gcc.dg/tree-ssa/prefetch-7.c scan-tree-dump-times optimized
"__builtin_ia32_mfence" 2
FAIL: gcc.dg/tree-ssa/prefetch-7.c scan-tree-dump-times optimized
"builtin_prefetch" 8


Revision 159511 is OK.  Revisions 159514/159515:

http://gcc.gnu.org/ml/gcc-cvs/2010-05/msg00566.html
http://gcc.gnu.org/ml/gcc-cvs/2010-05/msg00567.html

may be the cause.


-- 
           Summary: [4.6 regression] New prefetch test failures
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: middle-end
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: hjl dot tools at gmail dot com


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


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

* [Bug middle-end/44185] [4.6 regression] New prefetch test failures
  2010-05-18  2:40 [Bug middle-end/44185] New: [4.6 regression] New prefetch test failures hjl dot tools at gmail dot com
@ 2010-05-18  7:29 ` hjl dot tools at gmail dot com
  2010-05-18  9:56 ` rguenth at gcc dot gnu dot org
                   ` (9 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: hjl dot tools at gmail dot com @ 2010-05-18  7:29 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from hjl dot tools at gmail dot com  2010-05-18 07:29 -------
In general, with inlining, not a huge deal, although it can still
occur when functons are short-circuited. For certain applicatons
that are built with PIC, the IP-thunk, at the very least, should
be padded since it's a guaranteed stall on every call. Help Dhrysyone


-- 


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


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

* [Bug middle-end/44185] [4.6 regression] New prefetch test failures
  2010-05-18  2:40 [Bug middle-end/44185] New: [4.6 regression] New prefetch test failures hjl dot tools at gmail dot com
  2010-05-18  7:29 ` [Bug middle-end/44185] " hjl dot tools at gmail dot com
@ 2010-05-18  9:56 ` rguenth at gcc dot gnu dot org
  2010-05-18 19:39 ` changpeng dot fang at amd dot com
                   ` (8 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2010-05-18  9:56 UTC (permalink / raw)
  To: gcc-bugs



-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |4.6.0


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


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

* [Bug middle-end/44185] [4.6 regression] New prefetch test failures
  2010-05-18  2:40 [Bug middle-end/44185] New: [4.6 regression] New prefetch test failures hjl dot tools at gmail dot com
  2010-05-18  7:29 ` [Bug middle-end/44185] " hjl dot tools at gmail dot com
  2010-05-18  9:56 ` rguenth at gcc dot gnu dot org
@ 2010-05-18 19:39 ` changpeng dot fang at amd dot com
  2010-05-20 15:30 ` spop at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: changpeng dot fang at amd dot com @ 2010-05-18 19:39 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from changpeng dot fang at amd dot com  2010-05-18 19:39 -------
I have a patch to fix the test cases:
http://gcc.gnu.org/ml/gcc-patches/2010-05/msg01359.html

For prefetch-6.c, patch http://gcc.gnu.org/ml/gcc-cvs/2010-05/msg00567.html
applies the insn to prefetch ratio heuristic to loops with known trip count,
and thus filtered one prefetch out.  Add --param min-insn-to-prefetch-ratio=6
(default is 10) fixes the problem.

For prefetch-7.c, patch http://gcc.gnu.org/ml/gcc-cvs/2010-05/msg00566.html
does not generate prefetch if the loop is far from being sufficiently unrolled
required by the prefetching.  In this case, prefetching requires the loop to be
unrolled 16 times, but the loop is not unrolled due to the parameter
constraint.
We remove --param max-unrolled-insns=1 to allow unrolling and thus generating
prefetches.  The movnti count is also adjusted.


-- 


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


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

* [Bug middle-end/44185] [4.6 regression] New prefetch test failures
  2010-05-18  2:40 [Bug middle-end/44185] New: [4.6 regression] New prefetch test failures hjl dot tools at gmail dot com
                   ` (2 preceding siblings ...)
  2010-05-18 19:39 ` changpeng dot fang at amd dot com
@ 2010-05-20 15:30 ` spop at gcc dot gnu dot org
  2010-05-20 15:30 ` spop at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: spop at gcc dot gnu dot org @ 2010-05-20 15:30 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from spop at gcc dot gnu dot org  2010-05-20 15:30 -------
Fixed.


-- 

spop at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |FIXED


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


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

* [Bug middle-end/44185] [4.6 regression] New prefetch test failures
  2010-05-18  2:40 [Bug middle-end/44185] New: [4.6 regression] New prefetch test failures hjl dot tools at gmail dot com
                   ` (3 preceding siblings ...)
  2010-05-20 15:30 ` spop at gcc dot gnu dot org
@ 2010-05-20 15:30 ` spop at gcc dot gnu dot org
  2010-05-21  1:41 ` hjl dot tools at gmail dot com
                   ` (5 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: spop at gcc dot gnu dot org @ 2010-05-20 15:30 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from spop at gcc dot gnu dot org  2010-05-20 15:30 -------
Subject: Bug 44185

Author: spop
Date: Thu May 20 15:29:40 2010
New Revision: 159630

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=159630
Log:
Fix PR44185: new prefetch test failures.

2010-05-20  Changpeng Fang  <changpeng.fang@amd.com>

        PR middle-end/44185
        * gcc.dg/tree-ssa/prefetch-6.c: Add --param
min-insn-to-prefetch-ratio=6.
        * gcc.dg/tree-ssa/prefetch-7.c: Remove --param max-unrolled-insns=1 to
        allow unrolling, and adjust the movnti count.

Modified:
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/gcc.dg/tree-ssa/prefetch-6.c
    trunk/gcc/testsuite/gcc.dg/tree-ssa/prefetch-7.c


-- 


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


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

* [Bug middle-end/44185] [4.6 regression] New prefetch test failures
  2010-05-18  2:40 [Bug middle-end/44185] New: [4.6 regression] New prefetch test failures hjl dot tools at gmail dot com
                   ` (4 preceding siblings ...)
  2010-05-20 15:30 ` spop at gcc dot gnu dot org
@ 2010-05-21  1:41 ` hjl dot tools at gmail dot com
  2010-05-21 21:36 ` changpeng dot fang at amd dot com
                   ` (4 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: hjl dot tools at gmail dot com @ 2010-05-21  1:41 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from hjl dot tools at gmail dot com  2010-05-21 01:41 -------
The fix introduced:

FAIL: gcc.dg/tree-ssa/prefetch-7.c scan-assembler-times movnti 18
FAIL: gcc.dg/tree-ssa/prefetch-7.c scan-tree-dump-times optimized "={nt}" 18

on Linux/ia32.


-- 

hjl dot tools at gmail dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |UNCONFIRMED
         Resolution|FIXED                       |


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


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

* [Bug middle-end/44185] [4.6 regression] New prefetch test failures
  2010-05-18  2:40 [Bug middle-end/44185] New: [4.6 regression] New prefetch test failures hjl dot tools at gmail dot com
                   ` (5 preceding siblings ...)
  2010-05-21  1:41 ` hjl dot tools at gmail dot com
@ 2010-05-21 21:36 ` changpeng dot fang at amd dot com
  2010-05-21 21:46 ` dominiq at lps dot ens dot fr
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: changpeng dot fang at amd dot com @ 2010-05-21 21:36 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from changpeng dot fang at amd dot com  2010-05-21 21:36 -------
(In reply to comment #5)
> The fix introduced:
> 
> FAIL: gcc.dg/tree-ssa/prefetch-7.c scan-assembler-times movnti 18
> FAIL: gcc.dg/tree-ssa/prefetch-7.c scan-tree-dump-times optimized "={nt}" 18
> 
> on Linux/ia32.
> 

It seems the unrolling is quite different for different architecture. The count
of movnti in and assembly code depends on the unroll_factor.

I would propose to remove the movnti check in the assembly code. The dump
in aprefetch shows there are two non-temporal stores generated and this is
enough.


-- 


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


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

* [Bug middle-end/44185] [4.6 regression] New prefetch test failures
  2010-05-18  2:40 [Bug middle-end/44185] New: [4.6 regression] New prefetch test failures hjl dot tools at gmail dot com
                   ` (6 preceding siblings ...)
  2010-05-21 21:36 ` changpeng dot fang at amd dot com
@ 2010-05-21 21:46 ` dominiq at lps dot ens dot fr
  2010-05-21 21:49 ` hjl dot tools at gmail dot com
                   ` (2 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: dominiq at lps dot ens dot fr @ 2010-05-21 21:46 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from dominiq at lps dot ens dot fr  2010-05-21 21:46 -------
In http://gcc.gnu.org/ml/gcc-testresults/2010-05/msg02015.html I see:

FAIL: gcc.dg/tree-ssa/prefetch-3.c scan-tree-dump-times aprefetch "unroll
factor 4" 1
FAIL: gcc.dg/tree-ssa/prefetch-5.c scan-tree-dump-times aprefetch "Issued
prefetch" 2
FAIL: gcc.dg/tree-ssa/prefetch-6.c scan-tree-dump-times aprefetch "Issued
prefetch" 5
FAIL: gcc.dg/tree-ssa/prefetch-6.c scan-tree-dump-times aprefetch "Issued
nontemporal prefetch" 3
FAIL: gcc.dg/tree-ssa/prefetch-6.c scan-assembler-times prefetcht 5
FAIL: gcc.dg/tree-ssa/prefetch-6.c scan-assembler-times prefetchnta 3
FAIL: gcc.dg/tree-ssa/prefetch-7.c scan-tree-dump-times aprefetch "Issued
prefetch" 5
FAIL: gcc.dg/tree-ssa/prefetch-7.c scan-tree-dump-times aprefetch "Issued
nontemporal prefetch" 3
FAIL: gcc.dg/tree-ssa/prefetch-7.c scan-tree-dump-times aprefetch "a
nontemporal store" 2
FAIL: gcc.dg/tree-ssa/prefetch-7.c scan-tree-dump-times optimized
"builtin_prefetch" 8
FAIL: gcc.dg/tree-ssa/prefetch-7.c scan-tree-dump-times optimized "={nt}" 18
FAIL: gcc.dg/tree-ssa/prefetch-7.c scan-tree-dump-times optimized
"__builtin_ia32_mfence" 2
FAIL: gcc.dg/tree-ssa/prefetch-7.c scan-assembler-times prefetchw 5
FAIL: gcc.dg/tree-ssa/prefetch-7.c scan-assembler-times prefetcht 1
FAIL: gcc.dg/tree-ssa/prefetch-7.c scan-assembler-times prefetchnta 2
FAIL: gcc.dg/tree-ssa/prefetch-7.c scan-assembler-times movnti 18
FAIL: gcc.dg/tree-ssa/prefetch-7.c scan-assembler-times mfence 2
FAIL: gcc.dg/tree-ssa/update-unroll-1.c scan-tree-dump-not aprefetch "SUCC: 7
.100.0%"


-- 


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


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

* [Bug middle-end/44185] [4.6 regression] New prefetch test failures
  2010-05-18  2:40 [Bug middle-end/44185] New: [4.6 regression] New prefetch test failures hjl dot tools at gmail dot com
                   ` (7 preceding siblings ...)
  2010-05-21 21:46 ` dominiq at lps dot ens dot fr
@ 2010-05-21 21:49 ` hjl dot tools at gmail dot com
  2010-06-10 17:55 ` spop at gcc dot gnu dot org
  2010-06-17 23:33 ` spop at gcc dot gnu dot org
  10 siblings, 0 replies; 12+ messages in thread
From: hjl dot tools at gmail dot com @ 2010-05-21 21:49 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from hjl dot tools at gmail dot com  2010-05-21 21:48 -------
(In reply to comment #7)
> In http://gcc.gnu.org/ml/gcc-testresults/2010-05/msg02015.html I see:
> 

See PR 44203.


-- 


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


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

* [Bug middle-end/44185] [4.6 regression] New prefetch test failures
  2010-05-18  2:40 [Bug middle-end/44185] New: [4.6 regression] New prefetch test failures hjl dot tools at gmail dot com
                   ` (8 preceding siblings ...)
  2010-05-21 21:49 ` hjl dot tools at gmail dot com
@ 2010-06-10 17:55 ` spop at gcc dot gnu dot org
  2010-06-17 23:33 ` spop at gcc dot gnu dot org
  10 siblings, 0 replies; 12+ messages in thread
From: spop at gcc dot gnu dot org @ 2010-06-10 17:55 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #9 from spop at gcc dot gnu dot org  2010-06-10 17:55 -------
Subject: Bug 44185

Author: spop
Date: Thu Jun 10 17:54:39 2010
New Revision: 160566

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=160566
Log:
Fix PR44185: prefetch test failures.

2010-06-10  Changpeng Fang  <changpeng.fang@amd.com>

        PR middle-end/44185
        * gcc.dg/tree-ssa/prefetch-7.c: take the loops that will generate
        non-temporal stores out of the tests to form new test cases.  As a
        result, no non-temporal store should be generated in this case.

        * gcc.dg/tree-ssa/prefetch-8.c: New.  Test from original
        prefetch-7.c that generate one non-temporal store.

        * gcc.dg/tree-ssa/prefetch-9.c: New.  Test from original
        prefetch-7.c that generate one non-temporal store and one
        one-temporal prefetch.

Added:
    trunk/gcc/testsuite/gcc.dg/tree-ssa/prefetch-8.c
    trunk/gcc/testsuite/gcc.dg/tree-ssa/prefetch-9.c
Modified:
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/gcc.dg/tree-ssa/prefetch-7.c


-- 


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


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

* [Bug middle-end/44185] [4.6 regression] New prefetch test failures
  2010-05-18  2:40 [Bug middle-end/44185] New: [4.6 regression] New prefetch test failures hjl dot tools at gmail dot com
                   ` (9 preceding siblings ...)
  2010-06-10 17:55 ` spop at gcc dot gnu dot org
@ 2010-06-17 23:33 ` spop at gcc dot gnu dot org
  10 siblings, 0 replies; 12+ messages in thread
From: spop at gcc dot gnu dot org @ 2010-06-17 23:33 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #10 from spop at gcc dot gnu dot org  2010-06-17 23:33 -------
Fixed.


-- 

spop at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |FIXED


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


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

end of thread, other threads:[~2010-06-17 23:33 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-05-18  2:40 [Bug middle-end/44185] New: [4.6 regression] New prefetch test failures hjl dot tools at gmail dot com
2010-05-18  7:29 ` [Bug middle-end/44185] " hjl dot tools at gmail dot com
2010-05-18  9:56 ` rguenth at gcc dot gnu dot org
2010-05-18 19:39 ` changpeng dot fang at amd dot com
2010-05-20 15:30 ` spop at gcc dot gnu dot org
2010-05-20 15:30 ` spop at gcc dot gnu dot org
2010-05-21  1:41 ` hjl dot tools at gmail dot com
2010-05-21 21:36 ` changpeng dot fang at amd dot com
2010-05-21 21:46 ` dominiq at lps dot ens dot fr
2010-05-21 21:49 ` hjl dot tools at gmail dot com
2010-06-10 17:55 ` spop at gcc dot gnu dot org
2010-06-17 23:33 ` spop 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).