| 1 |
! Skip this on platforms that don't have the vectorization instructions |
| 2 |
! to handle complex types. This test is very slow on these platforms so |
| 3 |
! skipping is better then running it unvectorized. |
| 4 |
! { dg-skip-if "" { ia64-*-* sparc*-*-* } } |
| 5 |
! It can be slow on some x86 CPUs. |
| 6 |
! { dg-timeout-factor 2 } |
| 7 |
program mymatmul |
| 8 |
implicit none |
| 9 |
integer, parameter :: kp = 4 |
| 10 |
integer, parameter :: n = 400 |
| 11 |
real(kp), dimension(n,n) :: rr, ri |
| 12 |
complex(kp), dimension(n,n) :: a,b,c |
| 13 |
real :: t1, t2 |
| 14 |
integer :: i, j, k |
| 15 |
common // a,b,c |
| 16 |
|
| 17 |
do j = 1, n |
| 18 |
do k = 1, n |
| 19 |
do i = 1, n |
| 20 |
c(i,j) = c(i,j) + a(i,k) * b(k,j) |
| 21 |
end do |
| 22 |
end do |
| 23 |
end do |
| 24 |
|
| 25 |
end program mymatmul |
| 26 |
|
| 27 |
! { dg-final { scan-tree-dump "vectorized 1 loops" "vect" } } |