public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH, testsuite]: Fix gcc.target/i386/pr65105-1.c test
@ 2015-10-01 10:12 Uros Bizjak
  2015-10-01 10:25 ` Ilya Enkovich
  0 siblings, 1 reply; 2+ messages in thread
From: Uros Bizjak @ 2015-10-01 10:12 UTC (permalink / raw)
  To: gcc-patches
  Cc: Илья
	Энкович

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

Hello!

Attached patch fixes gcc.target/i386/pr65105-1.c:

a) As a runtime SSE2 test, we have to check for target SSE2 support
and use proper test infrastructure.

b) A runtime test can't check output assembly without -save-temps.

The patch also use another misuse of -save-temps in gcc.target/i386 directory.

The patch solves:

UNRESOLVED: gcc.target/i386/pr65105-1.c scan-assembler por
UNRESOLVED: gcc.target/i386/pr65105-1.c scan-assembler pand

2015-10-01  Uros Bizjak  <ubizjak@gmail.com>

    * gcc.target/i386/pr65105-1.c: Require sse2 effective target.
    (main): Rename to sse2_test.  Abort if count != 5.
    (dg-options): Add -save-temps.  Use "-msse2 -mtune=slm" instead
    of -march=slm.
    * gcc.target/i386/pr46865-2.c (dg-options): Remove -save-temps.

Tested on x86_64-linux-gnu {,-m32} and committed to mainline SVN.

Uros.

[-- Attachment #2: t.diff.txt --]
[-- Type: text/plain, Size: 1212 bytes --]

Index: gcc.target/i386/pr65105-1.c
===================================================================
--- gcc.target/i386/pr65105-1.c	(revision 228292)
+++ gcc.target/i386/pr65105-1.c	(working copy)
@@ -1,9 +1,12 @@
 /* PR target/pr65105 */
 /* { dg-do run { target { ia32 } } } */
-/* { dg-options "-O2 -march=slm" } */
+/* { dg-options "-O2 -msse2 -mtune=slm -save-temps" } */
+/* { dg-require-effective-target sse2 } */
 /* { dg-final { scan-assembler "por" } } */
 /* { dg-final { scan-assembler "pand" } } */
 
+#include "sse2-check.h"
+
 #include "stdlib.h"
 
 static int count = 0;
@@ -40,11 +43,13 @@
   arr[5] = 0xff000000L;
 }
 
-int
-main (int argc, const char **argv)
+static void
+sse2_test (void)
 {
   long long arr[6];
   fill_data (arr);
   test (arr);
-  return count - 5;
+
+  if (count != 5)
+    __builtin_abort ();
 }
Index: gcc.target/i386/pr46865-2.c
===================================================================
--- gcc.target/i386/pr46865-2.c	(revision 228292)
+++ gcc.target/i386/pr46865-2.c	(working copy)
@@ -1,6 +1,6 @@
 /* PR rtl-optimization/46865 */
 /* { dg-do compile } */
-/* { dg-options "-O2 -save-temps" } */
+/* { dg-options "-O2" } */
 
 extern unsigned long f;
 

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

* Re: [PATCH, testsuite]: Fix gcc.target/i386/pr65105-1.c test
  2015-10-01 10:12 [PATCH, testsuite]: Fix gcc.target/i386/pr65105-1.c test Uros Bizjak
@ 2015-10-01 10:25 ` Ilya Enkovich
  0 siblings, 0 replies; 2+ messages in thread
From: Ilya Enkovich @ 2015-10-01 10:25 UTC (permalink / raw)
  To: Uros Bizjak; +Cc: gcc-patches

2015-10-01 13:12 GMT+03:00 Uros Bizjak <ubizjak@gmail.com>:
> Hello!
>
> Attached patch fixes gcc.target/i386/pr65105-1.c:

Thanks!
Ilya

>
> a) As a runtime SSE2 test, we have to check for target SSE2 support
> and use proper test infrastructure.
>
> b) A runtime test can't check output assembly without -save-temps.
>
> The patch also use another misuse of -save-temps in gcc.target/i386 directory.
>
> The patch solves:
>
> UNRESOLVED: gcc.target/i386/pr65105-1.c scan-assembler por
> UNRESOLVED: gcc.target/i386/pr65105-1.c scan-assembler pand
>
> 2015-10-01  Uros Bizjak  <ubizjak@gmail.com>
>
>     * gcc.target/i386/pr65105-1.c: Require sse2 effective target.
>     (main): Rename to sse2_test.  Abort if count != 5.
>     (dg-options): Add -save-temps.  Use "-msse2 -mtune=slm" instead
>     of -march=slm.
>     * gcc.target/i386/pr46865-2.c (dg-options): Remove -save-temps.
>
> Tested on x86_64-linux-gnu {,-m32} and committed to mainline SVN.
>
> Uros.

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

end of thread, other threads:[~2015-10-01 10:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-01 10:12 [PATCH, testsuite]: Fix gcc.target/i386/pr65105-1.c test Uros Bizjak
2015-10-01 10:25 ` Ilya Enkovich

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