pr66174.c: New test.
* gcc.target/i386/pr66174.c: New test. From-SVN: r223275
This commit is contained in:
parent
f5a64dbf01
commit
fd02576de9
30
gcc/testsuite/gcc.target/i386/pr66174.c
Normal file
30
gcc/testsuite/gcc.target/i386/pr66174.c
Normal file
@ -0,0 +1,30 @@
|
||||
/* { dg-do compile } */
|
||||
/* { dg-options "-O -ftree-vectorize -mavx512f" } */
|
||||
|
||||
extern void abort (void);
|
||||
|
||||
typedef struct {
|
||||
unsigned int a;
|
||||
unsigned int b;
|
||||
} ii;
|
||||
|
||||
void foo (unsigned short *arr, ii *iarr)
|
||||
{
|
||||
ii *iptr = iarr;
|
||||
unsigned short res[128];
|
||||
ii ires[128];
|
||||
int i;
|
||||
for (i = 0; i < 128; i++)
|
||||
{
|
||||
ires[i].a = iptr->b - iptr->a;
|
||||
ires[i].b = iptr->b + iptr->a;
|
||||
iptr++;
|
||||
}
|
||||
for (i = 0; i < 128; i++)
|
||||
{
|
||||
if (res[i] != arr[i]
|
||||
|| ires[i].a != iarr[i].b - iarr[i].a
|
||||
|| ires[i].b != iarr[i].b + iarr[i].a)
|
||||
abort ();
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user