111
|
1 // { dg-do compile }
|
|
2 // { dg-options "-fopenmp -ffat-lto-objects" }
|
|
3
|
|
4 #pragma omp declare simd uniform(b) linear(c, d) linear(uval(e)) linear(ref(f))
|
|
5 int f1 (int a, int b, int c, int &d, int &e, int &f)
|
|
6 {
|
|
7 a++;
|
|
8 b++;
|
|
9 c++;
|
|
10 d++;
|
|
11 e++;
|
|
12 f++;
|
|
13 return a + b + c + d + e + f;
|
|
14 }
|
|
15
|
145
|
16 // { dg-warning "GCC does not currently support mixed size types for 'simd' functions" "" { target aarch64*-*-* } .-11 }
|
111
|
17 // { dg-final { scan-assembler-times "_ZGVbM4vulLUR4__Z2f1iiiRiS_S_:" 1 { target { i?86-*-* x86_64-*-* } } } }
|
|
18 // { dg-final { scan-assembler-times "_ZGVbN4vulLUR4__Z2f1iiiRiS_S_:" 1 { target { i?86-*-* x86_64-*-* } } } }
|
|
19 // { dg-final { scan-assembler-times "_ZGVcM4vulLUR4__Z2f1iiiRiS_S_:" 1 { target { i?86-*-* x86_64-*-* } } } }
|
|
20 // { dg-final { scan-assembler-times "_ZGVcN4vulLUR4__Z2f1iiiRiS_S_:" 1 { target { i?86-*-* x86_64-*-* } } } }
|
|
21 // { dg-final { scan-assembler-times "_ZGVdM8vulLUR4__Z2f1iiiRiS_S_:" 1 { target { i?86-*-* x86_64-*-* } } } }
|
|
22 // { dg-final { scan-assembler-times "_ZGVdN8vulLUR4__Z2f1iiiRiS_S_:" 1 { target { i?86-*-* x86_64-*-* } } } }
|
|
23 // { dg-final { scan-assembler-times "_ZGVeM16vulLUR4__Z2f1iiiRiS_S_:" 1 { target { i?86-*-* x86_64-*-* } } } }
|
|
24 // { dg-final { scan-assembler-times "_ZGVeN16vulLUR4__Z2f1iiiRiS_S_:" 1 { target { i?86-*-* x86_64-*-* } } } }
|
145
|
25
|
111
|
26
|
|
27 #pragma omp declare simd uniform(b) linear(c, d) linear(uval(e)) linear(ref(f))
|
|
28 int f2 (int a, int b, int c, int &d, int &e, int &f)
|
|
29 {
|
|
30 asm volatile ("" : : "r" (&a));
|
|
31 asm volatile ("" : : "r" (&b));
|
|
32 asm volatile ("" : : "r" (&c));
|
|
33 asm volatile ("" : : "r" (&d));
|
|
34 asm volatile ("" : : "r" (&e));
|
|
35 asm volatile ("" : : "r" (&f));
|
|
36 a++;
|
|
37 b++;
|
|
38 c++;
|
|
39 d++;
|
|
40 e++;
|
|
41 f++;
|
|
42 return a + b + c + d + e + f;
|
|
43 }
|
|
44
|
145
|
45 // { dg-warning "GCC does not currently support mixed size types for 'simd' functions" "" { target aarch64*-*-* } .-17 }
|
111
|
46 // { dg-final { scan-assembler-times "_ZGVbM4vulLUR4__Z2f2iiiRiS_S_:" 1 { target { i?86-*-* x86_64-*-* } } } }
|
|
47 // { dg-final { scan-assembler-times "_ZGVbN4vulLUR4__Z2f2iiiRiS_S_:" 1 { target { i?86-*-* x86_64-*-* } } } }
|
|
48 // { dg-final { scan-assembler-times "_ZGVcM4vulLUR4__Z2f2iiiRiS_S_:" 1 { target { i?86-*-* x86_64-*-* } } } }
|
|
49 // { dg-final { scan-assembler-times "_ZGVcN4vulLUR4__Z2f2iiiRiS_S_:" 1 { target { i?86-*-* x86_64-*-* } } } }
|
|
50 // { dg-final { scan-assembler-times "_ZGVdM8vulLUR4__Z2f2iiiRiS_S_:" 1 { target { i?86-*-* x86_64-*-* } } } }
|
|
51 // { dg-final { scan-assembler-times "_ZGVdN8vulLUR4__Z2f2iiiRiS_S_:" 1 { target { i?86-*-* x86_64-*-* } } } }
|
|
52 // { dg-final { scan-assembler-times "_ZGVeM16vulLUR4__Z2f2iiiRiS_S_:" 1 { target { i?86-*-* x86_64-*-* } } } }
|
|
53 // { dg-final { scan-assembler-times "_ZGVeN16vulLUR4__Z2f2iiiRiS_S_:" 1 { target { i?86-*-* x86_64-*-* } } } }
|
|
54
|
|
55 #pragma omp declare simd uniform(b) linear(c, d) linear(uval(e)) linear(ref(f))
|
|
56 int f3 (const int a, const int b, const int c, const int &d, const int &e, const int &f)
|
|
57 {
|
|
58 return a + b + c + d + e + f;
|
|
59 }
|
|
60
|
145
|
61 // { dg-warning "GCC does not currently support mixed size types for 'simd' functions" "" { target aarch64*-*-* } .-5 }
|
111
|
62 // { dg-final { scan-assembler-times "_ZGVbM4vulLUR4__Z2f3iiiRKiS0_S0_:" 1 { target { i?86-*-* x86_64-*-* } } } }
|
|
63 // { dg-final { scan-assembler-times "_ZGVbN4vulLUR4__Z2f3iiiRKiS0_S0_:" 1 { target { i?86-*-* x86_64-*-* } } } }
|
|
64 // { dg-final { scan-assembler-times "_ZGVcM4vulLUR4__Z2f3iiiRKiS0_S0_:" 1 { target { i?86-*-* x86_64-*-* } } } }
|
|
65 // { dg-final { scan-assembler-times "_ZGVcN4vulLUR4__Z2f3iiiRKiS0_S0_:" 1 { target { i?86-*-* x86_64-*-* } } } }
|
|
66 // { dg-final { scan-assembler-times "_ZGVdM8vulLUR4__Z2f3iiiRKiS0_S0_:" 1 { target { i?86-*-* x86_64-*-* } } } }
|
|
67 // { dg-final { scan-assembler-times "_ZGVdN8vulLUR4__Z2f3iiiRKiS0_S0_:" 1 { target { i?86-*-* x86_64-*-* } } } }
|
|
68 // { dg-final { scan-assembler-times "_ZGVeM16vulLUR4__Z2f3iiiRKiS0_S0_:" 1 { target { i?86-*-* x86_64-*-* } } } }
|
|
69 // { dg-final { scan-assembler-times "_ZGVeN16vulLUR4__Z2f3iiiRKiS0_S0_:" 1 { target { i?86-*-* x86_64-*-* } } } }
|
|
70
|
|
71 #pragma omp declare simd uniform(b) linear(c, d) linear(uval(e)) linear(ref(f))
|
|
72 int f4 (const int a, const int b, const int c, const int &d, const int &e, const int &f)
|
|
73 {
|
|
74 asm volatile ("" : : "r" (&a));
|
|
75 asm volatile ("" : : "r" (&b));
|
|
76 asm volatile ("" : : "r" (&c));
|
|
77 asm volatile ("" : : "r" (&d));
|
|
78 asm volatile ("" : : "r" (&e));
|
|
79 asm volatile ("" : : "r" (&f));
|
|
80 return a + b + c + d + e + f;
|
|
81 }
|
|
82
|
145
|
83 // { dg-warning "GCC does not currently support mixed size types for 'simd' functions" "" { target aarch64*-*-* } .-11 }
|
111
|
84 // { dg-final { scan-assembler-times "_ZGVbM4vulLUR4__Z2f4iiiRKiS0_S0_:" 1 { target { i?86-*-* x86_64-*-* } } } }
|
|
85 // { dg-final { scan-assembler-times "_ZGVbN4vulLUR4__Z2f4iiiRKiS0_S0_:" 1 { target { i?86-*-* x86_64-*-* } } } }
|
|
86 // { dg-final { scan-assembler-times "_ZGVcM4vulLUR4__Z2f4iiiRKiS0_S0_:" 1 { target { i?86-*-* x86_64-*-* } } } }
|
|
87 // { dg-final { scan-assembler-times "_ZGVcN4vulLUR4__Z2f4iiiRKiS0_S0_:" 1 { target { i?86-*-* x86_64-*-* } } } }
|
|
88 // { dg-final { scan-assembler-times "_ZGVdM8vulLUR4__Z2f4iiiRKiS0_S0_:" 1 { target { i?86-*-* x86_64-*-* } } } }
|
|
89 // { dg-final { scan-assembler-times "_ZGVdN8vulLUR4__Z2f4iiiRKiS0_S0_:" 1 { target { i?86-*-* x86_64-*-* } } } }
|
|
90 // { dg-final { scan-assembler-times "_ZGVeM16vulLUR4__Z2f4iiiRKiS0_S0_:" 1 { target { i?86-*-* x86_64-*-* } } } }
|
|
91 // { dg-final { scan-assembler-times "_ZGVeN16vulLUR4__Z2f4iiiRKiS0_S0_:" 1 { target { i?86-*-* x86_64-*-* } } } }
|