public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] testsuite: i386: Fix gcc.target/i386/avx512fp16-trunchf.c on Solaris [PR102835]
@ 2021-10-25 13:53 Rainer Orth
  2021-10-26  1:11 ` Hongyu Wang
  0 siblings, 1 reply; 2+ messages in thread
From: Rainer Orth @ 2021-10-25 13:53 UTC (permalink / raw)
  To: gcc-patches

[-- Attachment #1: Type: text/plain, Size: 960 bytes --]

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.

Ok for master?

	Rainer

-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University


2021-10-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

	gcc/testsuite:
	* gcc.target/i386/avx512fp16-trunchf.c: Allow for %esp instead of
	%ebp.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: testsuite-i386-avx512fp16-trunchf-ebp.patch --]
[-- Type: text/x-patch, Size: 1348 bytes --]

# HG changeset patch
# Parent  42f3c920a9840cff9344293def88b179095d62bd
testsuite: i386: Fix gcc.target/i386/avx512fp16-trunchf.c on Solaris [PR102835]

diff --git a/gcc/testsuite/gcc.target/i386/avx512fp16-trunchf.c b/gcc/testsuite/gcc.target/i386/avx512fp16-trunchf.c
--- 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 } } } */

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

* Re: [PATCH] testsuite: i386: Fix gcc.target/i386/avx512fp16-trunchf.c on Solaris [PR102835]
  2021-10-25 13:53 [PATCH] testsuite: i386: Fix gcc.target/i386/avx512fp16-trunchf.c on Solaris [PR102835] Rainer Orth
@ 2021-10-26  1:11 ` Hongyu Wang
  0 siblings, 0 replies; 2+ messages in thread
From: Hongyu Wang @ 2021-10-26  1:11 UTC (permalink / raw)
  To: Rainer Orth; +Cc: GCC Patches

I think this can be put in as an obvious fix.

Thanks for the patch.

Rainer Orth <ro@cebitec.uni-bielefeld.de> 于2021年10月25日周一 下午9:53写道:
>
> 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.
>
> Ok for master?
>
>         Rainer
>
> --
> -----------------------------------------------------------------------------
> Rainer Orth, Center for Biotechnology, Bielefeld University
>
>
> 2021-10-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
>
>         gcc/testsuite:
>         * gcc.target/i386/avx512fp16-trunchf.c: Allow for %esp instead of
>         %ebp.
>

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

end of thread, other threads:[~2021-10-26  1:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-25 13:53 [PATCH] testsuite: i386: Fix gcc.target/i386/avx512fp16-trunchf.c on Solaris [PR102835] Rainer Orth
2021-10-26  1:11 ` Hongyu Wang

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).