PR inline-asm/84742
[official-gcc.git] / gcc / testsuite / gfortran.dg / reassoc_4.f
blobb155cba768c6183e4e1afd8f37c826ffe8921e8a
1 ! { dg-do compile }
2 ! { dg-options "-O3 -ffast-math -fdump-tree-reassoc1 --param max-completely-peeled-insns=400" }
3 ! { dg-additional-options "--param max-completely-peel-times=16" { target spu-*-* } }
4 subroutine anisonl(w,vo,anisox,s,ii1,jj1,weight)
5 integer ii1,jj1,i1,iii1,j1,jjj1,k1,l1,m1,n1
6 real*8 w(3,3),vo(3,3),anisox(3,3,3,3),s(60,60),weight
8 ! This routine replaces the following lines in e_c3d.f for
9 ! an anisotropic material
11 do i1=1,3
12 iii1=ii1+i1-1
13 do j1=1,3
14 jjj1=jj1+j1-1
15 do k1=1,3
16 do l1=1,3
17 s(iii1,jjj1)=s(iii1,jjj1)
18 & +anisox(i1,k1,j1,l1)*w(k1,l1)*weight
19 do m1=1,3
20 s(iii1,jjj1)=s(iii1,jjj1)
21 & +anisox(i1,k1,m1,l1)*w(k1,l1)
22 & *vo(j1,m1)*weight
23 & +anisox(m1,k1,j1,l1)*w(k1,l1)
24 & *vo(i1,m1)*weight
25 do n1=1,3
26 s(iii1,jjj1)=s(iii1,jjj1)
27 & +anisox(m1,k1,n1,l1)
28 & *w(k1,l1)*vo(i1,m1)*vo(j1,n1)*weight
29 enddo
30 enddo
31 enddo
32 enddo
33 enddo
34 enddo
36 return
37 end
39 ! There should be 22 multiplications left after un-distributing
40 ! weigth, w(k1,l1), vo(i1,m1) and vo(j1,m1) on the innermost two
41 ! unrolled loops.
43 ! { dg-final { scan-tree-dump-times "\[0-9\] \\\* " 22 "reassoc1" } }