Commit 1a3e2d69 by Marek Polacek Committed by Marek Polacek

20040112-1.c: Fix defaulting to int.

	* gcc.target/i386/20040112-1.c: Fix defaulting to int.
	* gcc.target/i386/avxfp-1.c: Likewise.
	* gcc.target/i386/avxfp-2.c: Likewise.
	* gcc.target/i386/cadd.c: Likewise.
	* gcc.target/i386/cmov2.c: Likewise.
	* gcc.target/i386/cmov3.c: Likewise.
	* gcc.target/i386/cmov4.c: Likewise.
	* gcc.target/i386/cold-attribute-1.c: Likewise.
	* gcc.target/i386/cvt-1.c: Likewise.
	* gcc.target/i386/fpcvt-1.c: Likewise.
	* gcc.target/i386/fpcvt-2.c: Likewise.
	* gcc.target/i386/fpcvt-3.c: Likewise.
	* gcc.target/i386/local.c: Likewise.
	* gcc.target/i386/memcpy-2.c: Likewise.
	* gcc.target/i386/memcpy-3.c: Likewise.
	* gcc.target/i386/memset-1.c: Likewise.
	* gcc.target/i386/minmax-1.c: Likewise.
	* gcc.target/i386/minmax-2.c: Likewise.
	* gcc.target/i386/pr45352-2.c: Likewise.
	* gcc.target/i386/pr46253.c: Likewise.
	* gcc.target/i386/pr53623.c: Likewise.
	* gcc.target/i386/pr60902.c: Likewise.
	* gcc.target/i386/pr57003.c: Likewise.
	* gcc.target/i386/sse-14.c: Likewise.
	* gcc.target/i386/sse-19.c: Likewise.
	* gcc.target/i386/sse-22.c: Likewise.
	* gcc.target/i386/sse4a-extract.c: Likewise.
	* gcc.target/i386/sse4a-insert.c: Likewise.
	* gcc.target/i386/ssefp-1.c: Likewise.
	* gcc.target/i386/ssefp-2.c: Likewise.
	* gcc.target/i386/testimm-10.c: Likewise.
	* gcc.target/i386/vectorize4-avx.c: Likewise.
	* gcc.target/i386/980709-1.c: Fix implicit declarations.
	* gcc.target/i386/avx-pr57233.c: Likewise.
	* gcc.target/i386/avx2-pr57233.c: Likewise.
	* gcc.target/i386/avx2-vpop-check.h: Likewise.
	* gcc.target/i386/avx256-unaligned-load-7.c: Likewise.
	* gcc.target/i386/avx256-unaligned-store-7.c: Likewise.
	* gcc.target/i386/crc32-4.c: Likewise.
	* gcc.target/i386/pr20204.c: Likewise.
	* gcc.target/i386/pr23570.c: Likewise.
	* gcc.target/i386/pr26449-1.c: Likewise.
	* gcc.target/i386/pr28839.c: Likewise.
	* gcc.target/i386/pr37101.c: Likewise.
	* gcc.target/i386/pr61923.c: Likewise.
	* gcc.target/i386/shrink_wrap_1.c: Likewise.
	* gcc.target/i386/sse2-pr57233.c: Likewise.
	* gcc.target/i386/vect-abs-s16.c: Likewise.
	* gcc.target/i386/vect-abs-s32.c: Likewise.
	* gcc.target/i386/vect-abs-s8.c: Likewise.
	* gcc.target/i386/xop-pr57233.c: Likewise.
	* gcc.target/i386/xop-rotate2-vector.c: Likewise.
	* gcc.target/i386/cold-attribute-2.c: Fix defaulting to int.  Fix
	implicit declarations.
	* gcc.target/i386/xop-shift1-vector.c: Fix typo.
	* gcc.target/i386/xop-shift2-vector.c: Likewise.
	* gcc.target/i386/xop-shift3-vector.c: Likewise.

From-SVN: r215939
parent 99183741
2014-10-06 Marek Polacek <polacek@redhat.com> 2014-10-06 Marek Polacek <polacek@redhat.com>
* gcc.target/i386/20040112-1.c: Fix defaulting to int.
* gcc.target/i386/avxfp-1.c: Likewise.
* gcc.target/i386/avxfp-2.c: Likewise.
* gcc.target/i386/cadd.c: Likewise.
* gcc.target/i386/cmov2.c: Likewise.
* gcc.target/i386/cmov3.c: Likewise.
* gcc.target/i386/cmov4.c: Likewise.
* gcc.target/i386/cold-attribute-1.c: Likewise.
* gcc.target/i386/cvt-1.c: Likewise.
* gcc.target/i386/fpcvt-1.c: Likewise.
* gcc.target/i386/fpcvt-2.c: Likewise.
* gcc.target/i386/fpcvt-3.c: Likewise.
* gcc.target/i386/local.c: Likewise.
* gcc.target/i386/memcpy-2.c: Likewise.
* gcc.target/i386/memcpy-3.c: Likewise.
* gcc.target/i386/memset-1.c: Likewise.
* gcc.target/i386/minmax-1.c: Likewise.
* gcc.target/i386/minmax-2.c: Likewise.
* gcc.target/i386/pr45352-2.c: Likewise.
* gcc.target/i386/pr46253.c: Likewise.
* gcc.target/i386/pr53623.c: Likewise.
* gcc.target/i386/pr60902.c: Likewise.
* gcc.target/i386/pr57003.c: Likewise.
* gcc.target/i386/sse-14.c: Likewise.
* gcc.target/i386/sse-19.c: Likewise.
* gcc.target/i386/sse-22.c: Likewise.
* gcc.target/i386/sse4a-extract.c: Likewise.
* gcc.target/i386/sse4a-insert.c: Likewise.
* gcc.target/i386/ssefp-1.c: Likewise.
* gcc.target/i386/ssefp-2.c: Likewise.
* gcc.target/i386/testimm-10.c: Likewise.
* gcc.target/i386/vectorize4-avx.c: Likewise.
* gcc.target/i386/980709-1.c: Fix implicit declarations.
* gcc.target/i386/avx-pr57233.c: Likewise.
* gcc.target/i386/avx2-pr57233.c: Likewise.
* gcc.target/i386/avx2-vpop-check.h: Likewise.
* gcc.target/i386/avx256-unaligned-load-7.c: Likewise.
* gcc.target/i386/avx256-unaligned-store-7.c: Likewise.
* gcc.target/i386/crc32-4.c: Likewise.
* gcc.target/i386/pr20204.c: Likewise.
* gcc.target/i386/pr23570.c: Likewise.
* gcc.target/i386/pr26449-1.c: Likewise.
* gcc.target/i386/pr28839.c: Likewise.
* gcc.target/i386/pr37101.c: Likewise.
* gcc.target/i386/pr61923.c: Likewise.
* gcc.target/i386/shrink_wrap_1.c: Likewise.
* gcc.target/i386/sse2-pr57233.c: Likewise.
* gcc.target/i386/vect-abs-s16.c: Likewise.
* gcc.target/i386/vect-abs-s32.c: Likewise.
* gcc.target/i386/vect-abs-s8.c: Likewise.
* gcc.target/i386/xop-pr57233.c: Likewise.
* gcc.target/i386/xop-rotate2-vector.c: Likewise.
* gcc.target/i386/cold-attribute-2.c: Fix defaulting to int. Fix
implicit declarations.
* gcc.target/i386/xop-shift1-vector.c: Fix typo.
* gcc.target/i386/xop-shift2-vector.c: Likewise.
* gcc.target/i386/xop-shift3-vector.c: Likewise.
2014-10-06 Marek Polacek <polacek@redhat.com>
* gcc.dg/20001012-1.c: Fix defaulting to int. * gcc.dg/20001012-1.c: Fix defaulting to int.
* gcc.dg/20001012-2.c: Likewise. * gcc.dg/20001012-2.c: Likewise.
* gcc.dg/20001108-1.c: Likewise. * gcc.dg/20001108-1.c: Likewise.
......
/* { dg-do compile } */ /* { dg-do compile } */
/* { dg-options "-O2" } */ /* { dg-options "-O2" } */
/* { dg-final { scan-assembler "testb" } } */ /* { dg-final { scan-assembler "testb" } } */
void
ftn (char *sp) ftn (char *sp)
{ {
char status; char status;
......
...@@ -13,6 +13,7 @@ extern __inline__ int test_and_set_bit(int nr, volatile void * addr) ...@@ -13,6 +13,7 @@ extern __inline__ int test_and_set_bit(int nr, volatile void * addr)
struct buffer_head { struct buffer_head {
unsigned long b_state; unsigned long b_state;
}; };
void __wait_on_buffer (struct buffer_head *);
extern void lock_buffer(struct buffer_head * bh) extern void lock_buffer(struct buffer_head * bh)
{ {
while (test_and_set_bit(2 , &bh->b_state)) while (test_and_set_bit(2 , &bh->b_state))
......
...@@ -4,6 +4,8 @@ ...@@ -4,6 +4,8 @@
#include "avx-check.h" #include "avx-check.h"
int do_main (void);
static void static void
avx_test (void) avx_test (void)
{ {
......
...@@ -4,6 +4,8 @@ ...@@ -4,6 +4,8 @@
#include "avx2-check.h" #include "avx2-check.h"
int do_main (void);
static void static void
avx2_test (void) avx2_test (void)
{ {
......
...@@ -6,6 +6,7 @@ TYPE a[SIZE]; ...@@ -6,6 +6,7 @@ TYPE a[SIZE];
TYPE b[SIZE]; TYPE b[SIZE];
TYPE c[SIZE]; TYPE c[SIZE];
volatile TYPE c_ref[SIZE]; volatile TYPE c_ref[SIZE];
extern int memcmp (const void *, const void *, size_t);
__attribute__ ((__noinline__)) __attribute__ ((__noinline__))
void void
......
...@@ -10,6 +10,7 @@ char **ep; ...@@ -10,6 +10,7 @@ char **ep;
char **fp; char **fp;
char **mp; char **mp;
char **lp; char **lp;
extern int strcmp (const char *, const char *);
__attribute__ ((noinline)) __attribute__ ((noinline))
void void
......
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
char **ep; char **ep;
char **fp; char **fp;
extern int strcmp (const char *, const char *);
__attribute__ ((noinline)) __attribute__ ((noinline))
void void
......
...@@ -3,12 +3,14 @@ ...@@ -3,12 +3,14 @@
/* { dg-final { scan-assembler "vmaxsd" } } */ /* { dg-final { scan-assembler "vmaxsd" } } */
/* { dg-final { scan-assembler "vminsd" } } */ /* { dg-final { scan-assembler "vminsd" } } */
double x; double x;
void
t() t()
{ {
x=x>5?x:5; x=x>5?x:5;
} }
double x; double x;
void
q() q()
{ {
x=x<5?x:5; x=x<5?x:5;
......
...@@ -3,12 +3,14 @@ ...@@ -3,12 +3,14 @@
/* { dg-final { scan-assembler "vmaxsd" } } */ /* { dg-final { scan-assembler "vmaxsd" } } */
/* { dg-final { scan-assembler "vminsd" } } */ /* { dg-final { scan-assembler "vminsd" } } */
double x; double x;
void
q() q()
{ {
x=x<5?5:x; x=x<5?5:x;
} }
double x; double x;
void
q1() q1()
{ {
x=x>5?5:x; x=x>5?5:x;
......
...@@ -6,6 +6,7 @@ extern void abort (void); ...@@ -6,6 +6,7 @@ extern void abort (void);
/* Conditional increment is best done using sbb $-1, val. */ /* Conditional increment is best done using sbb $-1, val. */
int t[]={0,0,0,0,1,1,1,1,1,1}; int t[]={0,0,0,0,1,1,1,1,1,1};
void
q() q()
{ {
int sum=0; int sum=0;
...@@ -16,6 +17,7 @@ q() ...@@ -16,6 +17,7 @@ q()
if (sum != 6) if (sum != 6)
abort (); abort ();
} }
int
main() main()
{ {
int i; int i;
......
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
/* { dg-final { scan-assembler "sbb" } } */ /* { dg-final { scan-assembler "sbb" } } */
/* This conditional move is fastest to be done using sbb. */ /* This conditional move is fastest to be done using sbb. */
int
t(unsigned int a, unsigned int b) t(unsigned int a, unsigned int b)
{ {
return (a<=b?5:-5); return (a<=b?5:-5);
......
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
/* { dg-final { scan-assembler "cmov\[^3\]" } } */ /* { dg-final { scan-assembler "cmov\[^3\]" } } */
/* This conditional move is fastest to be done using cmov. */ /* This conditional move is fastest to be done using cmov. */
int
t(int a, int b) t(int a, int b)
{ {
return (a<=b?5:-5); return (a<=b?5:-5);
......
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
int ARCHnodes; int ARCHnodes;
int *nodekind; int *nodekind;
float *nodekindf; float *nodekindf;
void
t() t()
{ {
int i; int i;
......
...@@ -2,11 +2,12 @@ ...@@ -2,11 +2,12 @@
/* { dg-options "-O2" } */ /* { dg-options "-O2" } */
#include <string.h> #include <string.h>
static inline static inline
__attribute__ ((cold)) __attribute__ ((cold)) void
my_cold_memset (void *a, int b,int c) my_cold_memset (void *a, int b,int c)
{ {
memset (a,b,c); memset (a,b,c);
} }
void
t(void *a,int b,int c) t(void *a,int b,int c)
{ {
if (a) if (a)
......
/* { dg-do compile } */ /* { dg-do compile } */
/* { dg-options "-O2 --param=builtin-expect-probability=100" } */ /* { dg-options "-O2 --param=builtin-expect-probability=100" } */
#include <string.h> #include <string.h>
void cold_hint (void);
int
t(int c) t(int c)
{ {
if (__builtin_expect (c, 0)) if (__builtin_expect (c, 0))
......
...@@ -2,6 +2,9 @@ ...@@ -2,6 +2,9 @@
/* { dg-options "-O2 -mno-sse4.2 -mno-crc32" } */ /* { dg-options "-O2 -mno-sse4.2 -mno-crc32" } */
/* { dg-final { scan-assembler "__builtin_ia32_crc32di" } } */ /* { dg-final { scan-assembler "__builtin_ia32_crc32di" } } */
unsigned long long __builtin_ia32_crc32di (unsigned long long x,
unsigned long long y);
unsigned long long unsigned long long
crc32d (unsigned long long x, unsigned long long y) crc32d (unsigned long long x, unsigned long long y)
{ {
......
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
int a,a1; int a,a1;
double b; double b;
float b1; float b1;
void
t() t()
{ {
a=b; a=b;
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
/* { dg-options "-O2 -msse2 -march=k8" } */ /* { dg-options "-O2 -msse2 -march=k8" } */
/* { dg-final { scan-assembler-not "cvtss2sd" } } */ /* { dg-final { scan-assembler-not "cvtss2sd" } } */
float a,b; float a,b;
int
main() main()
{ {
a=b*3.0; a=b*3.0;
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
/* { dg-options "-O2 -msse2 -march=k8" } */ /* { dg-options "-O2 -msse2 -march=k8" } */
/* { dg-final { scan-assembler-not "cvtss2sd" } } */ /* { dg-final { scan-assembler-not "cvtss2sd" } } */
float a,b; float a,b;
int
main() main()
{ {
return a<0.0; return a<0.0;
......
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
/* { dg-final { scan-assembler-not "cvtss2sd" } } */ /* { dg-final { scan-assembler-not "cvtss2sd" } } */
extern double fabs (double); extern double fabs (double);
float a,b; float a,b;
int
main() main()
{ {
a=fabs(b)+1.0; a=fabs(b)+1.0;
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
/* { dg-final { scan-assembler "magic\[^\\n\]*(edi|ecx)" { target { ! { ia32 } } } } } */ /* { dg-final { scan-assembler "magic\[^\\n\]*(edi|ecx)" { target { ! { ia32 } } } } } */
/* Verify that local calling convention is used. */ /* Verify that local calling convention is used. */
static t(int) __attribute__ ((noinline)); static void t(int) __attribute__ ((noinline));
extern volatile int i; extern volatile int i;
void m(void) void m(void)
...@@ -12,7 +12,7 @@ void m(void) ...@@ -12,7 +12,7 @@ void m(void)
t(i); t(i);
} }
static t(int a) static void t(int a)
{ {
asm("magic %0"::"g"(a)); asm("magic %0"::"g"(a));
} }
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
/* { dg-options "-O2" } */ /* { dg-options "-O2" } */
void *a; void *a;
void *b; void *b;
void
t(unsigned int c) t(unsigned int c)
{ {
if (c<10) if (c<10)
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
/* { dg-options "-O2" } */ /* { dg-options "-O2" } */
void *a; void *a;
void *b; void *b;
void
t(int c) t(int c)
{ {
if (c<10) if (c<10)
......
...@@ -36,6 +36,7 @@ static union { ...@@ -36,6 +36,7 @@ static union {
char A = 'A'; char A = 'A';
int
main () main ()
{ {
int off, len, i; int off, len, i;
......
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
/* { dg-final { scan-assembler "test" } } */ /* { dg-final { scan-assembler "test" } } */
/* { dg-final { scan-assembler-not "cmp" } } */ /* { dg-final { scan-assembler-not "cmp" } } */
#define max(a,b) (((a) > (b))? (a) : (b)) #define max(a,b) (((a) > (b))? (a) : (b))
int
t(int a) t(int a)
{ {
return (max(a,1)); return (max(a,1));
......
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
/* { dg-final { scan-assembler "test" } } */ /* { dg-final { scan-assembler "test" } } */
/* { dg-final { scan-assembler-not "cmp" } } */ /* { dg-final { scan-assembler-not "cmp" } } */
#define max(a,b) (((a) > (b))? (a) : (b)) #define max(a,b) (((a) > (b))? (a) : (b))
unsigned int
t(unsigned int a) t(unsigned int a)
{ {
return (max(a,1)); return (max(a,1));
......
/* { dg-do run } */ /* { dg-do run } */
/* { dg-options "-O2" } */ /* { dg-options "-O2" } */
extern int memcmp (const void *, const void *, __SIZE_TYPE__);
void *x (void *pdst, const void *psrc, unsigned int pn) void *x (void *pdst, const void *psrc, unsigned int pn)
{ {
register void *return_dst = pdst; register void *return_dst = pdst;
......
...@@ -71,6 +71,9 @@ sse_swap_rowf (float *r1, float *r2, int n) ...@@ -71,6 +71,9 @@ sse_swap_rowf (float *r1, float *r2, int n)
} }
} }
void swap_index (int *, int, int);
void sse_add_rowf (float *, float *, float, int);
void void
ludcompf (float *m, int nw, int *prow, int n) ludcompf (float *m, int nw, int *prow, int n)
{ {
......
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
typedef short __v8hi __attribute__ ((__vector_size__ (16))); typedef short __v8hi __attribute__ ((__vector_size__ (16)));
typedef long long __m128i __attribute__ ((__vector_size__ (16))); typedef long long __m128i __attribute__ ((__vector_size__ (16)));
extern int memcmp (const void *, const void *, __SIZE_TYPE__);
void sse2_test (void) void sse2_test (void)
{ {
......
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
static int ready[10]; static int ready[10];
void abort (void); void abort (void);
int b (void);
void test_once (int t,int t1) void test_once (int t,int t1)
{ {
int i, repeat; int i, repeat;
......
...@@ -20,6 +20,7 @@ typedef struct _ClientResource ...@@ -20,6 +20,7 @@ typedef struct _ClientResource
} ClientResourceRec; } ClientResourceRec;
static ClientResourceRec clientTable[256]; static ClientResourceRec clientTable[256];
int Hash (int, unsigned int);
void void
RebuildTable (int client) RebuildTable (int client)
......
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
/* { dg-options "-O1 -mtune=amdfam10 -fexpensive-optimizations -fgcse -foptimize-register-move -freorder-blocks -fschedule-insns2 -funswitch-loops -fgcse-las -fselective-scheduling2 -fsel-sched-pipelining -funroll-all-loops" } */ /* { dg-options "-O1 -mtune=amdfam10 -fexpensive-optimizations -fgcse -foptimize-register-move -freorder-blocks -fschedule-insns2 -funswitch-loops -fgcse-las -fselective-scheduling2 -fsel-sched-pipelining -funroll-all-loops" } */
typedef char uint8_t; typedef char uint8_t;
typedef uint32_t; typedef int uint32_t;
typedef vo_frame_t; typedef int vo_frame_t;
__extension__ typedef __SIZE_TYPE__ size_t; __extension__ typedef __SIZE_TYPE__ size_t;
struct vo_frame_s struct vo_frame_s
...@@ -47,7 +47,7 @@ static int bitstream_init (picture_t * picture, void *start) ...@@ -47,7 +47,7 @@ static int bitstream_init (picture_t * picture, void *start)
picture->bitstream_ptr = start; picture->bitstream_ptr = start;
return (int) (size_t) start; return (int) (size_t) start;
} }
static slice_xvmc_init (picture_t * picture, int code) static void slice_xvmc_init (picture_t * picture, int code)
{ {
int offset; int offset;
struct vo_frame_s *forward_reference_frame; struct vo_frame_s *forward_reference_frame;
......
/* { dg-do compile } */ /* { dg-do compile } */
/* { dg-options "-O -g -mf16c -mtune=generic -dp" } */ /* { dg-options "-O -g -mf16c -mtune=generic -dp" } */
typedef __m256i __attribute__ ((__vector_size__ (32))); typedef int __m256i __attribute__ ((__vector_size__ (32)));
__m256i bar (void); __m256i bar (void);
void foo (void) void foo (void)
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
#include <stdint.h> #include <stdint.h>
typedef (*inst_t)(int64_t rdi, int64_t rsi, int64_t rdx); typedef int (*inst_t)(int64_t rdi, int64_t rsi, int64_t rdx);
int16_t code[256]; int16_t code[256];
inst_t dispatch[256]; inst_t dispatch[256];
......
...@@ -21,7 +21,7 @@ baz (unsigned long x) ...@@ -21,7 +21,7 @@ baz (unsigned long x)
return d; return d;
} }
__attribute__ ((ms_abi, noinline, noclone)) __attribute__ ((ms_abi, noinline, noclone)) void
foo (void) foo (void)
{ {
unsigned d; unsigned d;
......
...@@ -5,6 +5,7 @@ extern void exit (int); ...@@ -5,6 +5,7 @@ extern void exit (int);
int x; int x;
void
foo() foo()
{ {
static int count; static int count;
......
...@@ -19,6 +19,7 @@ struct ext4_map_blocks ...@@ -19,6 +19,7 @@ struct ext4_map_blocks
int m_flags; int m_flags;
}; };
int ext4_da_map_blocks_ei_0; int ext4_da_map_blocks_ei_0;
void fn2 (int, int);
void fn1 (int p1, struct ext4_map_blocks *p2) void fn1 (int p1, struct ext4_map_blocks *p2)
{ {
int ret; int ret;
......
...@@ -20,6 +20,7 @@ extern rtx c_readstr (const char *, enum machine_mode); ...@@ -20,6 +20,7 @@ extern rtx c_readstr (const char *, enum machine_mode);
extern rtx convert_to_mode (enum machine_mode, rtx, int); extern rtx convert_to_mode (enum machine_mode, rtx, int);
extern rtx expand_mult (enum machine_mode, rtx, rtx, rtx, int); extern rtx expand_mult (enum machine_mode, rtx, rtx, rtx, int);
extern rtx force_reg (enum machine_mode, rtx); extern rtx force_reg (enum machine_mode, rtx);
extern unsigned char mode_size_inline (enum machine_mode);
extern void *memset (void *__s, int __c, size_t __n); extern void *memset (void *__s, int __c, size_t __n);
rtx rtx
......
...@@ -68,13 +68,13 @@ ...@@ -68,13 +68,13 @@
{ return func (A, B, C, imm1, imm2, imm3); } { return func (A, B, C, imm1, imm2, imm3); }
#define test_3v(func, op1_type, op2_type, op3_type, imm) \ #define test_3v(func, op1_type, op2_type, op3_type, imm) \
_CONCAT(_,func) (op1_type A, op2_type B, \ int _CONCAT(_,func) (op1_type A, op2_type B, \
op3_type C, int const I) \ op3_type C, int const I) \
{ func (A, B, C, imm); } { func (A, B, C, imm); }
#define test_3vx(func, op1_type, op2_type, op3_type, imm1, imm2) \ #define test_3vx(func, op1_type, op2_type, op3_type, imm1, imm2) \
_CONCAT(_,func) (op1_type A, op2_type B, \ int _CONCAT(_,func) (op1_type A, op2_type B, \
op3_type C, int const I, int const L) \ op3_type C, int const I, int const L) \
{ func (A, B, C, imm1, imm2); } { func (A, B, C, imm1, imm2); }
#define test_4(func, type, op1_type, op2_type, op3_type, op4_type, imm) \ #define test_4(func, type, op1_type, op2_type, op3_type, op4_type, imm) \
...@@ -93,8 +93,8 @@ ...@@ -93,8 +93,8 @@
{ return func (A, B, C, D, imm1, imm2, imm3); } { return func (A, B, C, D, imm1, imm2, imm3); }
#define test_4v(func, op1_type, op2_type, op3_type, op4_type, imm) \ #define test_4v(func, op1_type, op2_type, op3_type, op4_type, imm) \
_CONCAT(_,func) (op1_type A, op2_type B, \ int _CONCAT(_,func) (op1_type A, op2_type B, \
op3_type C, op4_type D, int const I) \ op3_type C, op4_type D, int const I) \
{ func (A, B, C, D, imm); } { func (A, B, C, D, imm); }
......
...@@ -13,6 +13,7 @@ __m128i bar (char x) { ...@@ -13,6 +13,7 @@ __m128i bar (char x) {
return _mm_set_epi8 (x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x); return _mm_set_epi8 (x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x);
} }
int
main() { main() {
int i, j; int i, j;
union u { __m128i v; char c[16]; }; union u { __m128i v; char c[16]; };
......
...@@ -67,13 +67,13 @@ ...@@ -67,13 +67,13 @@
{ return func (A, B, C, imm1, imm2, imm3); } { return func (A, B, C, imm1, imm2, imm3); }
#define test_3v(func, op1_type, op2_type, op3_type, imm) \ #define test_3v(func, op1_type, op2_type, op3_type, imm) \
_CONCAT(_,func) (op1_type A, op2_type B, \ int _CONCAT(_,func) (op1_type A, op2_type B, \
op3_type C, int const I) \ op3_type C, int const I) \
{ func (A, B, C, imm); } { func (A, B, C, imm); }
#define test_3vx(func, op1_type, op2_type, op3_type, imm1, imm2) \ #define test_3vx(func, op1_type, op2_type, op3_type, imm1, imm2) \
_CONCAT(_,func) (op1_type A, op2_type B, \ int _CONCAT(_,func) (op1_type A, op2_type B, \
op3_type C, int const I, int const L) \ op3_type C, int const I, int const L) \
{ func (A, B, C, imm1, imm2); } { func (A, B, C, imm1, imm2); }
#define test_4(func, type, op1_type, op2_type, op3_type, op4_type, imm) \ #define test_4(func, type, op1_type, op2_type, op3_type, op4_type, imm) \
...@@ -93,8 +93,8 @@ ...@@ -93,8 +93,8 @@
#define test_4v(func, op1_type, op2_type, op3_type, op4_type, imm) \ #define test_4v(func, op1_type, op2_type, op3_type, op4_type, imm) \
_CONCAT(_,func) (op1_type A, op2_type B, \ int _CONCAT(_,func) (op1_type A, op2_type B, \
op3_type C, op4_type D, int const I) \ op3_type C, op4_type D, int const I) \
{ func (A, B, C, D, imm); } { func (A, B, C, D, imm); }
......
...@@ -4,6 +4,8 @@ ...@@ -4,6 +4,8 @@
#include "sse2-check.h" #include "sse2-check.h"
int do_main (void);
static void static void
sse2_test (void) sse2_test (void)
{ {
......
...@@ -37,7 +37,7 @@ sse4a_test_extrqi (long long in) ...@@ -37,7 +37,7 @@ sse4a_test_extrqi (long long in)
return (v_out.i[0]); return (v_out.i[0]);
} }
static chk (long long i1, long long i2) static int chk (long long i1, long long i2)
{ {
int n_fails =0; int n_fails =0;
if (i1 != i2) if (i1 != i2)
......
...@@ -38,7 +38,7 @@ sse4a_test_inserti (long long in1, long long in2) ...@@ -38,7 +38,7 @@ sse4a_test_inserti (long long in1, long long in2)
return (v_out.i[0]); return (v_out.i[0]);
} }
static chk (long long i1, long long i2) static int chk (long long i1, long long i2)
{ {
int n_fails =0; int n_fails =0;
if (i1 != i2) if (i1 != i2)
......
...@@ -3,12 +3,14 @@ ...@@ -3,12 +3,14 @@
/* { dg-final { scan-assembler "maxsd" } } */ /* { dg-final { scan-assembler "maxsd" } } */
/* { dg-final { scan-assembler "minsd" } } */ /* { dg-final { scan-assembler "minsd" } } */
double x; double x;
void
t() t()
{ {
x=x>5?x:5; x=x>5?x:5;
} }
double x; double x;
void
q() q()
{ {
x=x<5?x:5; x=x<5?x:5;
......
...@@ -3,12 +3,14 @@ ...@@ -3,12 +3,14 @@
/* { dg-final { scan-assembler "maxsd" } } */ /* { dg-final { scan-assembler "maxsd" } } */
/* { dg-final { scan-assembler "minsd" } } */ /* { dg-final { scan-assembler "minsd" } } */
double x; double x;
void
q() q()
{ {
x=x<5?5:x; x=x<5?5:x;
} }
double x; double x;
void
q1() q1()
{ {
x=x>5?5:x; x=x>5?5:x;
......
...@@ -142,6 +142,7 @@ test8bit (void) ...@@ -142,6 +142,7 @@ test8bit (void)
} }
void
test1bit (void) { test1bit (void) {
m256d = _mm512_extractf64x4_pd (m512d, 256); /* { dg-error "the last argument must be a 1-bit immediate" } */ m256d = _mm512_extractf64x4_pd (m512d, 256); /* { dg-error "the last argument must be a 1-bit immediate" } */
m256d = _mm512_mask_extractf64x4_pd (m256d, mmask8, m512d, 256); /* { dg-error "the last argument must be a 1-bit immediate" } */ m256d = _mm512_mask_extractf64x4_pd (m256d, mmask8, m512d, 256); /* { dg-error "the last argument must be a 1-bit immediate" } */
...@@ -160,6 +161,7 @@ test1bit (void) { ...@@ -160,6 +161,7 @@ test1bit (void) {
m512i = _mm512_maskz_inserti64x4 (mmask8, m512i, m256i, 256); /* { dg-error "the last argument must be a 1-bit immediate" } */ m512i = _mm512_maskz_inserti64x4 (mmask8, m512i, m256i, 256); /* { dg-error "the last argument must be a 1-bit immediate" } */
} }
void
test2bit (void) { test2bit (void) {
m128 = _mm512_extractf32x4_ps(m512, 256); /* { dg-error "the last argument must be a 2-bit immediate" } */ m128 = _mm512_extractf32x4_ps(m512, 256); /* { dg-error "the last argument must be a 2-bit immediate" } */
m128 = _mm512_mask_extractf32x4_ps(m128, mmask8, m512, 256); /* { dg-error "the last argument must be a 2-bit immediate" } */ m128 = _mm512_mask_extractf32x4_ps(m128, mmask8, m512, 256); /* { dg-error "the last argument must be a 2-bit immediate" } */
...@@ -178,6 +180,7 @@ test2bit (void) { ...@@ -178,6 +180,7 @@ test2bit (void) {
m512i = _mm512_maskz_inserti32x4 (mmask16, m512i, m128i, 256); /* { dg-error "the last argument must be a 2-bit immediate" } */ m512i = _mm512_maskz_inserti32x4 (mmask16, m512i, m128i, 256); /* { dg-error "the last argument must be a 2-bit immediate" } */
} }
void
test4bit (void) { test4bit (void) {
m512d = _mm512_getmant_pd (m512d, 1, 64); /* { dg-error "the immediate argument must be a 4-bit immediate" } */ m512d = _mm512_getmant_pd (m512d, 1, 64); /* { dg-error "the immediate argument must be a 4-bit immediate" } */
m512d = _mm512_mask_getmant_pd (m512d, mmask8, m512d, 1, 64); /* { dg-error "the immediate argument must be a 4-bit immediate" } */ m512d = _mm512_mask_getmant_pd (m512d, mmask8, m512d, 1, 64); /* { dg-error "the immediate argument must be a 4-bit immediate" } */
......
/* { dg-do compile } */ /* { dg-do compile } */
/* { dg-options "-O2 -ftree-vectorize -msse2 -mno-sse3 -fdump-tree-vect-details" } */ /* { dg-options "-O2 -ftree-vectorize -msse2 -mno-sse3 -fdump-tree-vect-details" } */
int abs (int);
void test (short* a, short* b) void test (short* a, short* b)
{ {
......
/* { dg-do compile } */ /* { dg-do compile } */
/* { dg-options "-O2 -ftree-vectorize -msse2 -mno-sse3 -fdump-tree-vect-details" } */ /* { dg-options "-O2 -ftree-vectorize -msse2 -mno-sse3 -fdump-tree-vect-details" } */
int abs (int);
void test (int* a, int* b) void test (int* a, int* b)
{ {
......
/* { dg-do compile } */ /* { dg-do compile } */
/* { dg-options "-O2 -ftree-vectorize -msse2 -mno-sse3 -fdump-tree-vect-details" } */ /* { dg-options "-O2 -ftree-vectorize -msse2 -mno-sse3 -fdump-tree-vect-details" } */
int abs (int);
void test (char* a, char* b) void test (char* a, char* b)
{ {
......
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
extern double sqrt (double __x); extern double sqrt (double __x);
void
calc_freq (int *dest) calc_freq (int *dest)
{ {
float tmp_out[257]; float tmp_out[257];
......
...@@ -4,6 +4,8 @@ ...@@ -4,6 +4,8 @@
#include "xop-check.h" #include "xop-check.h"
int do_main (void);
static void static void
xop_test (void) xop_test (void)
{ {
......
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
/* { dg-options "-O2 -mxop -mno-avx2 -ftree-vectorize" } */ /* { dg-options "-O2 -mxop -mno-avx2 -ftree-vectorize" } */
extern void exit (int); extern void exit (int);
extern void right_rotate (void);
typedef long __m128i __attribute__ ((__vector_size__ (16), __may_alias__)); typedef long __m128i __attribute__ ((__vector_size__ (16), __may_alias__));
......
...@@ -27,7 +27,7 @@ left_shift32 (void) ...@@ -27,7 +27,7 @@ left_shift32 (void)
int main () int main ()
{ {
left_shfit32 (); left_shift32 ();
exit (0); exit (0);
} }
......
...@@ -27,7 +27,7 @@ right_sign_shift32 (void) ...@@ -27,7 +27,7 @@ right_sign_shift32 (void)
int main () int main ()
{ {
right_sign_shfit32 (); right_sign_shift32 ();
exit (0); exit (0);
} }
......
...@@ -27,7 +27,7 @@ right_uns_shift32 (void) ...@@ -27,7 +27,7 @@ right_uns_shift32 (void)
int main () int main ()
{ {
right_uns_shfit32 (); right_uns_shift32 ();
exit (0); exit (0);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment