blob: 39bb6e7dd364c173993e6e363b5d11321380642a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
/* { dg-do assemble } */
/* { dg-options "-O2 -mcpu=cortex-a57 -ftree-vectorize -fdump-tree-vect-all" } */
/* The various ways to turn off simd availability should
turn off vectorization. */
__attribute__ ((target ("+nosimd")))
int
baz (int *a)
{
for (int i = 0; i < 1024; i++)
a[i] += 5;
}
__attribute__ ((target ("arch=armv8-a+nosimd")))
int
baz2 (int *a)
{
for (int i = 0; i < 1024; i++)
a[i] += 5;
}
__attribute__ ((target ("cpu=cortex-a53+nosimd")))
int
baz3 (int *a)
{
for (int i = 0; i < 1024; i++)
a[i] += 5;
}
__attribute__ ((target ("general-regs-only")))
int
baz4 (int *a)
{
for (int i = 0; i < 1024; i++)
a[i] += 5;
}
/* { dg-final { scan-tree-dump-not "vectorized 1 loops" "vect" } } */
|