The tests gcc.target/i386/memcpy-strategy-3.c and memset-strategy-1.c on x86_64-apple-darwin* FAIL: gcc.target/i386/memcpy-strategy-3.c scan-assembler-times memcpy 2 FAIL: gcc.target/i386/memset-strategy-1.c scan-assembler-times memset 2 Running the test manually I get [macbook] f90/bug% grep memset memset-strategy-1.s jmp _memset [macbook] f90/bug% grep memcpy memcpy-strategy-3.s call _memcpy
Still present at r208448 (see http://gcc.gnu.org/ml/gcc-testresults/2014-03/msg00667.html).
Would the following patch be acceptable? --- ../_clean/gcc/testsuite/gcc.target/i386/memcpy-strategy-3.c 2014-05-10 23:13:06.000000000 +0200 +++ gcc/testsuite/gcc.target/i386/memcpy-strategy-3.c 2014-09-27 15:15:50.000000000 +0200 @@ -1,6 +1,7 @@ /* { dg-do compile } */ /* { dg-options "-O2 -march=atom -mmemcpy-strategy=vector_loop:2000:align,libcall:-1:align" } */ -/* { dg-final { scan-assembler-times "memcpy" 2 } } */ +/* { dg-final { scan-assembler-times "memcpy" 2 { target { ! *-*-darwin* } } } } */ +/* { dg-final { scan-assembler-times "memcpy" 1 { target i?86-*-darwin* x86_64-*-darwin* } } } */ char a[2048]; char b[2048]; --- ../_clean/gcc/testsuite/gcc.target/i386/memset-strategy-1.c 2014-05-10 23:13:02.000000000 +0200 +++ gcc/testsuite/gcc.target/i386/memset-strategy-1.c 2014-09-27 15:14:08.000000000 +0200 @@ -1,6 +1,7 @@ /* { dg-do compile } */ /* { dg-options "-O2 -march=atom -mmemset-strategy=libcall:-1:align" } */ -/* { dg-final { scan-assembler-times "memset" 2 } } */ +/* { dg-final { scan-assembler-times "memset" 2 { target { ! *-*-darwin* } } } } */ +/* { dg-final { scan-assembler-times "memset" 1 { target i?86-*-darwin* x86_64-*-darwin* } } } */ char a[2048]; void t (void)
Still present at r220301 (see https://gcc.gnu.org/ml/gcc-testresults/2015-01/msg03581.html). Does the patch in comment 2 makes sense or is there a better fix?
ping
(In reply to Dominique d'Humieres from comment #3) > Still present at r220301 (see > https://gcc.gnu.org/ml/gcc-testresults/2015-01/msg03581.html). Does the > patch in comment 2 makes sense or is there a better fix? Try sending it to gcc-patches for review
(In reply to Dominique d'Humieres from comment #3) > Still present at r220301 (see > https://gcc.gnu.org/ml/gcc-testresults/2015-01/msg03581.html). Does the > patch in comment 2 makes sense or is there a better fix? cc-ing FX from that
(In reply to Eric Gallager from comment #6) > (In reply to Dominique d'Humieres from comment #3) > > Still present at r220301 (see > > https://gcc.gnu.org/ml/gcc-testresults/2015-01/msg03581.html). Does the > > patch in comment 2 makes sense or is there a better fix? > > cc-ing FX from that I have a local patch for this too, which I'm intending to apply as time permits. The main difference is explaining the reason that Darwin is different - and simplifying the condition. /* { dg-do compile } */ /* { dg-options "-O2 -march=atom -mmemcpy-strategy=vector_loop:2000:align,libcall:-1:align" } */ -/* { dg-final { scan-assembler-times "memcpy" 2 } } */ +/* one hit comes from the .file directive. */ +/* { dg-final { scan-assembler-times "memcpy" 2 { target { ! *-*-darwin* } } } } */ +/* but not on Darwin. */ +/* { dg-final { scan-assembler-times "_memcpy" 1 { target *-*-darwin* } } } */ char a[2048]; char b[2048];
Author: iains Date: Mon May 20 12:28:18 2019 New Revision: 271415 URL: https://gcc.gnu.org/viewcvs?rev=271415&root=gcc&view=rev Log: darwin, testsuite - fix PR58321 Darwin doesn't emit a .file directive by default and one of the scan-asm hits for ELF targets comes from this directive. Adjust for Darwin and explain. 2019-05-20 Iain Sandoe <iain@sandoe.co.uk> PR testsuite/58321 * gcc.target/i386/memcpy-strategy-3.c: Adjust count for Darwin and add a comment as to the reason for the difference. * gcc.target/i386/memset-strategy-1.c: Likewise. Modified: trunk/gcc/testsuite/ChangeLog trunk/gcc/testsuite/gcc.target/i386/memcpy-strategy-3.c trunk/gcc/testsuite/gcc.target/i386/memset-strategy-1.c
Author: iains Date: Sun Aug 4 09:53:37 2019 New Revision: 274058 URL: https://gcc.gnu.org/viewcvs?rev=274058&root=gcc&view=rev Log: Darwin, X86, backport fix for PR58321. 2019-08-04 Iain Sandoe <iain@sandoe.co.uk> Backport from mainline. 2019-05-20 Iain Sandoe <iain@sandoe.co.uk> PR testsuite/58321 * gcc.target/i386/memcpy-strategy-3.c: Adjust count for Darwin and add a comment as to the reason for the difference. * gcc.target/i386/memset-strategy-1.c: Likewise. Modified: branches/gcc-9-branch/gcc/testsuite/ChangeLog branches/gcc-9-branch/gcc/testsuite/gcc.target/i386/memcpy-strategy-3.c branches/gcc-9-branch/gcc/testsuite/gcc.target/i386/memset-strategy-1.c
fixed for trunk and 9.2
Author: iains Date: Wed Aug 28 19:27:06 2019 New Revision: 275002 URL: https://gcc.gnu.org/viewcvs?rev=275002&root=gcc&view=rev Log: [Darwin, testsuite ] Backport fix for PR58321. gcc/testsuite/ 2019-08-28 Iain Sandoe <iain@sandoe.co.uk> Backport from mainline. 2019-05-20 Iain Sandoe <iain@sandoe.co.uk> PR testsuite/58321 * gcc.target/i386/memcpy-strategy-3.c: Adjust count for Darwin and add a comment as to the reason for the difference. * gcc.target/i386/memset-strategy-1.c: Likewise. Modified: branches/gcc-8-branch/gcc/testsuite/ChangeLog branches/gcc-8-branch/gcc/testsuite/gcc.target/i386/memcpy-strategy-3.c branches/gcc-8-branch/gcc/testsuite/gcc.target/i386/memset-strategy-1.c
fixed for 8.4
Author: iains Date: Fri Sep 6 15:51:01 2019 New Revision: 275466 URL: https://gcc.gnu.org/viewcvs?rev=275466&root=gcc&view=rev Log: [Darwin, testsuite ] Fix for PR58321. Darwin doesn't emit a .file directive by default and one of the scan-asm hits for ELF targets comes from this directive. Adjust for Darwin and explain. 2019-09-06 Iain Sandoe <iain@sandoe.co.uk> Backport from mainline. 2019-05-20 Iain Sandoe <iain@sandoe.co.uk> PR testsuite/58321 * gcc.target/i386/memcpy-strategy-3.c: Adjust count for Darwin and add a comment as to the reason for the difference. * gcc.target/i386/memset-strategy-1.c: Likewise. Modified: branches/gcc-7-branch/gcc/testsuite/ChangeLog branches/gcc-7-branch/gcc/testsuite/gcc.target/i386/memcpy-strategy-3.c branches/gcc-7-branch/gcc/testsuite/gcc.target/i386/memset-strategy-1.c
Fixed in all open branches, closing.