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
40
41
42
43
44
45
46
47
48
49
50
|
! { dg-require-effective-target vect_int }
Subroutine foo (N, M)
Integer N
Integer M
integer A(8,16)
integer B(8)
B = (/ 2, 3, 5, 7, 11, 13, 17, 23 /)
! Unknown loop bound. J depends on I.
do I = 1, N
do J = I, M
A(J,2) = B(J)
end do
end do
do I = 1, N
do J = I, M
if (A(J,2) /= B(J)) then
call abort ()
endif
end do
end do
Return
end
program main
Call foo (16, 8)
stop
end
! { dg-final { scan-tree-dump-times "vectorized 2 loops" 1 "vect" { xfail { vect_no_align || lp64 } } } }
! { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" { xfail { vect_no_align || lp64 } } } }
! { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 2 "vect" { xfail { vect_no_align || lp64 } } } }
! We also expect to vectorize one loop for lp64 targets that support
! misaligned access:
! scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target { lp64 && !vect_no_align } }
! scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" { target { lp64 && !vect_no_align } }
! scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { target { lp64 && !vect_no_align } }
! but we currently can't combine logical operators. (Could define
! a keyword for "not_vect_no_align" if desired).
! { dg-final { cleanup-tree-dump "vect" } }
|