From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1147) id AB0183858C27; Tue, 26 Oct 2021 12:28:46 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org AB0183858C27 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Rainer Orth To: gcc-cvs@gcc.gnu.org Subject: [gcc r12-4712] testsuite: i386: Fix gcc.target/i386/avx512fp16-trunchf.c on Solaris [PR102835] X-Act-Checkin: gcc X-Git-Author: Rainer Orth X-Git-Refname: refs/heads/master X-Git-Oldrev: ace06d730a8f41827d9d1a0067b596cc1ad37680 X-Git-Newrev: 2243f6cf4d18f8793eb3e77c444a191763509285 Message-Id: <20211026122846.AB0183858C27@sourceware.org> Date: Tue, 26 Oct 2021 12:28:46 +0000 (GMT) X-BeenThere: gcc-cvs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Oct 2021 12:28:46 -0000 https://gcc.gnu.org/g:2243f6cf4d18f8793eb3e77c444a191763509285 commit r12-4712-g2243f6cf4d18f8793eb3e77c444a191763509285 Author: Rainer Orth Date: Tue Oct 26 14:23:06 2021 +0200 testsuite: i386: Fix gcc.target/i386/avx512fp16-trunchf.c on Solaris [PR102835] The gcc.target/i386/avx512fp16-trunchf.c test FAILs on 32-bit Solaris/x86: FAIL: gcc.target/i386/avx512fp16-trunchf.c scan-assembler-times vcvttsh2si[ \\\\t]+[^{\\n]*(?:%xmm[0-9]|\\\\(%esp\\\\))+, %eax(?:\\n|[ \\\\t]+#) 3 FAIL: gcc.target/i386/avx512fp16-trunchf.c scan-assembler-times vcvttsh2usi[ \\\\t]+[^{\\n]*(?:%xmm[0-9]|\\\\(%esp\\\\))+, %eax(?:\\n|[ \\\\t]+#) 2 This happens because Solaris defaults to -fno-omit-frame-pointer, so it uses %ebp instead of the expected %esp. As Hongyu Wang suggested in the PR, this can be fixed by accepting both forms, which this patch does. Tested on i386-pc-solaris2.11 and x86_64-pc-linux-gnu. 2021-10-20 Rainer Orth gcc/testsuite: PR testsuite/102835 * gcc.target/i386/avx512fp16-trunchf.c: Allow for %esp instead of %ebp. Diff: --- gcc/testsuite/gcc.target/i386/avx512fp16-trunchf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gcc/testsuite/gcc.target/i386/avx512fp16-trunchf.c b/gcc/testsuite/gcc.target/i386/avx512fp16-trunchf.c index 2c025b7803c..337a7b0d4b0 100644 --- a/gcc/testsuite/gcc.target/i386/avx512fp16-trunchf.c +++ b/gcc/testsuite/gcc.target/i386/avx512fp16-trunchf.c @@ -1,7 +1,7 @@ /* { dg-do compile } */ /* { dg-options "-O2 -mavx512fp16" } */ -/* { dg-final { scan-assembler-times "vcvttsh2si\[ \\t\]+\[^\{\n\]*(?:%xmm\[0-9\]|\\(%esp\\))+, %eax(?:\n|\[ \\t\]+#)" 3 } } */ -/* { dg-final { scan-assembler-times "vcvttsh2usi\[ \\t\]+\[^\{\n\]*(?:%xmm\[0-9\]|\\(%esp\\))+, %eax(?:\n|\[ \\t\]+#)" 2 } } */ +/* { dg-final { scan-assembler-times "vcvttsh2si\[ \\t\]+\[^\{\n\]*(?:%xmm\[0-9\]|\\(%e\[bs\]p\\))+, %eax(?:\n|\[ \\t\]+#)" 3 } } */ +/* { dg-final { scan-assembler-times "vcvttsh2usi\[ \\t\]+\[^\{\n\]*(?:%xmm\[0-9\]|\\(%e\[bs\]p\\))+, %eax(?:\n|\[ \\t\]+#)" 2 } } */ /* { dg-final { scan-assembler-times "vcvttsh2si\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+, %rax(?:\n|\[ \\t\]+#)" 1 { target { ! ia32 } } } } */ /* { dg-final { scan-assembler-times "vcvttsh2usi\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+, %rax(?:\n|\[ \\t\]+#)" 1 { target { ! ia32 } } } } */ /* { dg-final { scan-assembler "xorl\[ \\t\]+%edx, %edx" { target ia32 } } } */