testcase for shared DR alignment
This adds a reduced C testcase from libgomp.fortran/examples-4/target-1.f90 and libgomp.fortran/examples-4/target_data-1.f90 FAILs, showing a case of SLP instance stmt sharing that affects the shared dataref alignment info. 2020-06-12 Richard Biener <rguenther@suse.de> * gcc.dg/vect/bb-slp-44.c: New testcase.
This commit is contained in:
parent
d30846a02e
commit
4544793ef6
1 changed files with 41 additions and 0 deletions
41
gcc/testsuite/gcc.dg/vect/bb-slp-44.c
Normal file
41
gcc/testsuite/gcc.dg/vect/bb-slp-44.c
Normal file
|
@ -0,0 +1,41 @@
|
|||
/* { dg-do run } */
|
||||
|
||||
typedef struct {
|
||||
unsigned long a;
|
||||
unsigned long b;
|
||||
unsigned long c;
|
||||
} data_o;
|
||||
typedef struct {
|
||||
unsigned long c;
|
||||
unsigned long gap1;
|
||||
unsigned long b;
|
||||
unsigned long gap2;
|
||||
unsigned long a;
|
||||
unsigned long x;
|
||||
} data_i;
|
||||
|
||||
volatile unsigned long gx;
|
||||
void __attribute__((noipa))
|
||||
bar(unsigned long x)
|
||||
{
|
||||
gx = x;
|
||||
}
|
||||
|
||||
void __attribute__((noipa))
|
||||
foo(data_o *o, data_i *i)
|
||||
{
|
||||
o->a = i->a;
|
||||
o->b = i->b;
|
||||
o->c = i->c;
|
||||
bar (i->x);
|
||||
}
|
||||
|
||||
int main()
|
||||
{
|
||||
unsigned long data[9];
|
||||
if ((__UINTPTR_TYPE__)data & 15 != 0)
|
||||
foo ((data_o *)&data[6], (data_i *)data);
|
||||
else
|
||||
foo ((data_o *)data, (data_i *)&data[3]);
|
||||
return 0;
|
||||
}
|
Loading…
Add table
Reference in a new issue