Debian Codegraph @

gcc/testsuite/gfortran.dg/vect/vect-5.f90

raw
1 ! { dg-require-effective-target vect_int }
2 ! { dg-additional-options "-fno-tree-loop-distribute-patterns --param vect-max-peeling-for-alignment=0" }
3
4 Subroutine foo (N, M)
5 Integer N
6 Integer M
7 integer A(8,16)
8 integer B(8)
9
10 B = (/ 2, 3, 5, 7, 11, 13, 17, 23 /)
11
12 ! Unknown loop bound. J depends on I.
13
14 do I = 1, N
15 do J = I, M
16 A(J,2) = B(J)
17 end do
18 end do
19
20 do I = 1, N
21 !GCC$ novector
22 do J = I, M
23 if (A(J,2) /= B(J)) then
24 STOP 1
25 endif
26 end do
27 end do
28
29 Return
30 end
31
32
33 program main
34
35 Call foo (16, 8)
36
37 stop
38 end
39
40 ! { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } }
41 ! { dg-final { scan-tree-dump-times "Alignment of access forced using versioning." 2 "vect" { target { vect_no_align && { ! vect_hw_misalign } } } } }
42 ! { dg-final { scan-tree-dump-times "Alignment of access forced using versioning." 1 "vect" { target { {! vector_alignment_reachable} && {! vect_hw_misalign} } } } }