2015-12-10 Vladimir Makarov <vmakarov@redhat.com>
[official-gcc.git] / gcc / testsuite / gcc.target / i386 / pr65078-2.c
blobbf220cd56418e73e0897ac13fd7cf3e478df03fd
1 /* PR target/65078 */
2 /* { dg-do compile } */
3 /* { dg-options "-O2 -mavx" } */
4 /* { dg-additional-options "-mregparm=2" { target ia32 } } */
5 /* { dg-final { scan-assembler-not "\\(%\[er\]sp\\)" } } */
7 typedef unsigned char V __attribute__((vector_size (32)));
8 typedef unsigned long long W __attribute__((vector_size (32)));
9 typedef unsigned int T __attribute__((vector_size (32)));
11 void
12 f1 (unsigned long long *x, V y)
14 *x = ((W)y)[0];
17 #if defined(__x86_64__) || defined(ALL)
18 unsigned long long
19 f2 (V y)
21 return ((W)y)[0];
23 #endif
25 void
26 f3 (unsigned int *x, V y)
28 *x = ((T)y)[0];
31 unsigned int
32 f4 (V y)
34 return ((T)y)[0];
37 void
38 f5 (unsigned long long *x, W y)
40 *x = ((W)y)[0];
43 #if defined(__x86_64__) || defined(ALL)
44 unsigned long long
45 f6 (W y)
47 return ((W)y)[0];
49 #endif
51 void
52 f7 (unsigned int *x, T y)
54 *x = ((T)y)[0];
57 unsigned int
58 f8 (T y)
60 return ((T)y)[0];