public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH, i386]: Improve x86 target selectors and cleanup a couple of gcc.dg tests
@ 2016-09-22 18:16 Uros Bizjak
  0 siblings, 0 replies; only message in thread
From: Uros Bizjak @ 2016-09-22 18:16 UTC (permalink / raw)
  To: gcc-patches

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

2016-09-22  Uros Bizjak  <ubizjak@gmail.com>

    * gcc.dg/ifcvt-1.c: Compile also for 64-bit i?86-*-* target.
    * gcc.dg/ifcvt-2.c: Ditto.
    * gcc.dg/zero_bits_compound-1.c: Ditto.
    * gcc.dg/zero_bits_compound-1.c: Ditto.
    * gcc.dg/pr40550.c: Simplify target selectors.
    Use dg-additional-options.
    * gcc.dg/pr47893.c: Ditto.
    * gcc.dg/pr68435.c: Compile also for i?86-*-* target.  Add -march=i686
    additional options for 32-bit x86 targets.
    * gcc.dg/pr70955.c: Move to ...
    * gcc.target/i386/pr70955.c: ... here.  Simplify target selector.

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

Uros.

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

Index: gcc.dg/ifcvt-1.c
===================================================================
--- gcc.dg/ifcvt-1.c	(revision 240365)
+++ gcc.dg/ifcvt-1.c	(working copy)
@@ -1,4 +1,4 @@
-/* { dg-do compile { target aarch64*-*-* x86_64-*-* } } */
+/* { dg-do compile { target { { { i?86-*-* x86_64-*-* } && { ! ia32 } } || aarch64*-*-* } } } */
 /* { dg-options "-fdump-rtl-ce1 -O2" } */
 
 int
Index: gcc.dg/ifcvt-2.c
===================================================================
--- gcc.dg/ifcvt-2.c	(revision 240365)
+++ gcc.dg/ifcvt-2.c	(working copy)
@@ -1,7 +1,6 @@
-/* { dg-do compile { target aarch64*-*-* x86_64-*-* } } */
+/* { dg-do compile { target { { { i?86-*-* x86_64-*-* } && { ! ia32 } } || aarch64*-*-* } } } */
 /* { dg-options "-fdump-rtl-ce1 -O2 --param max-rtl-if-conversion-unpredictable-cost=100" } */
 
-
 typedef unsigned char uint8_t;
 typedef unsigned int uint16_t;
 
Index: gcc.dg/pr40550.c
===================================================================
--- gcc.dg/pr40550.c	(revision 240365)
+++ gcc.dg/pr40550.c	(working copy)
@@ -1,6 +1,7 @@
 /* { dg-do run } */
-/* { dg-options "-msse" { target { { i?86-*-* x86_64-*-* } && ilp32 } } } */
-/* { dg-require-effective-target sse_runtime { target { { i?86-*-* x86_64-*-* } && ilp32 } } } */
+/* { dg-options "" } */
+/* { dg-additional-options "-msse" { target i?86-*-* x86_64-*-* } } */
+/* { dg-require-effective-target sse_runtime { target { i?86-*-* x86_64-*-* } } } */
 
 typedef float v2sf __attribute__ ((vector_size (2 * sizeof(float))));
 
Index: gcc.dg/pr47893.c
===================================================================
--- gcc.dg/pr47893.c	(revision 240365)
+++ gcc.dg/pr47893.c	(working copy)
@@ -1,7 +1,7 @@
 /* PR middle-end/47893 */
 /* { dg-do run } */
 /* { dg-options "-O2" } */
-/* { dg-options "-O2 -mtune=atom -fno-omit-frame-pointer -fno-strict-aliasing" { target { { i?86-*-* x86_64-*-* } && ilp32 } } } */
+/* { dg-additional-options "-mtune=atom -fno-omit-frame-pointer -fno-strict-aliasing" { target { { i?86-*-* x86_64-*-* } && ia32 } } } */
 /* { dg-skip-if "Too much RAM needed" { "avr-*-*" } { "*" } { "" } } */
 
 extern void abort (void);
Index: gcc.dg/pr68435.c
===================================================================
--- gcc.dg/pr68435.c	(revision 240365)
+++ gcc.dg/pr68435.c	(working copy)
@@ -1,5 +1,6 @@
-/* { dg-do compile { target aarch64*-*-* x86_64-*-* } } */
+/* { dg-do compile { target aarch64*-*-* i?86-*-* x86_64-*-* } } */
 /* { dg-options "-fdump-rtl-ce1 -O2 -w --param max-rtl-if-conversion-unpredictable-cost=100" } */
+/* { dg-additional-options "-march=i686" { target { { i?86-*-* x86_64-*-* } && ia32 } } } */
 
 typedef struct cpp_reader cpp_reader;
 enum cpp_ttype
Index: gcc.dg/pr70955.c
===================================================================
--- gcc.dg/pr70955.c	(revision 240365)
+++ gcc.dg/pr70955.c	(nonexistent)
@@ -1,36 +0,0 @@
-/* __builtin_ms_va_list is only supported for x86_64 -m64.  */
-/* { dg-do run { target { x86_64-*-* && { ! ilp32 } } } } */
-/* { dg-require-effective-target lto } */
-/* { dg-options "-flto" } */
-
-#include <stdio.h>
-
-int __attribute__((ms_abi))
-foo (int n, ...)
-{
-  __builtin_ms_va_list ap;
-  int sum = 0;
-
-  __builtin_ms_va_start (ap, n);
-
-  while (n--)
-    {
-      sum += __builtin_va_arg (ap, int);
-      printf ("sum = %d\n", sum);
-    }
-
-  __builtin_ms_va_end (ap);
-
-  return sum;
-}
-
-int
-main (void)
-{
-  int res = foo (10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10);
-
-  if (res != 55)
-    __builtin_abort ();
-
-  return 0;
-}
Index: gcc.dg/zero_bits_compound-1.c
===================================================================
--- gcc.dg/zero_bits_compound-1.c	(revision 240365)
+++ gcc.dg/zero_bits_compound-1.c	(working copy)
@@ -4,7 +4,7 @@
 /* Note: This test requires that char, int and long have different sizes and the
    target has a way to do 32 -> 64 bit zero extension other than AND.  */
 
-/* { dg-do compile { target x86_64-*-* s390*-*-* aarch64*-*-* } } */
+/* { dg-do compile { target i?86-*-* x86_64-*-* s390*-*-* aarch64*-*-* } } */
 /* { dg-require-effective-target lp64 } */
 /* { dg-options "-O3 -dP" } */
 
Index: gcc.dg/zero_bits_compound-2.c
===================================================================
--- gcc.dg/zero_bits_compound-2.c	(revision 240365)
+++ gcc.dg/zero_bits_compound-2.c	(working copy)
@@ -1,7 +1,7 @@
 /* Test whether an AND mask or'ed with the know zero bits that equals a mode
    mask is a candidate for zero extendion.  */
 
-/* { dg-do compile { target x86_64-*-* s390*-*-* aarch64*-*-* } } */
+/* { dg-do compile { target i?86-*-* x86_64-*-* s390*-*-* aarch64*-*-* } } */
 /* { dg-require-effective-target lp64 } */
 /* { dg-options "-O3 -dP" } */
 
Index: gcc.target/i386/pr70955.c
===================================================================
--- gcc.target/i386/pr70955.c	(revision 240365)
+++ gcc.target/i386/pr70955.c	(working copy)
@@ -1,5 +1,5 @@
-/* __builtin_ms_va_list is only supported for x86_64 -m64.  */
-/* { dg-do run { target { x86_64-*-* && { ! ilp32 } } } } */
+/* __builtin_ms_va_list is only supported for -m64.  */
+/* { dg-do run { target lp64 } } */
 /* { dg-require-effective-target lto } */
 /* { dg-options "-flto" } */
 

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2016-09-22 18:13 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-22 18:16 [PATCH, i386]: Improve x86 target selectors and cleanup a couple of gcc.dg tests Uros Bizjak

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