blob: c8c8a0cb6ebcf70052fbac87011587665cda13b4 (
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
|
-- { dg-do compile { target i?86-*-* x86_64-*-* } }
-- { dg-options "-O3 -msse2 -fdump-tree-optimized" }
package body Vect11 is
function "+" (X, Y : Sarray) return Sarray is
R : Sarray;
begin
for I in Sarray'Range loop
R(I) := X(I) + Y(I);
end loop;
return R;
end;
procedure Add (X, Y : Sarray; R : out Sarray) is
begin
for I in Sarray'Range loop
R(I) := X(I) + Y(I);
end loop;
end;
procedure Add (X, Y : not null access Sarray; R : not null access Sarray) is
begin
for I in Sarray'Range loop
pragma Loop_Optimize (Ivdep);
R(I) := X(I) + Y(I);
end loop;
end;
end Vect11;
-- { dg-final { scan-tree-dump-not "goto" "optimized" } }
-- { dg-final { cleanup-tree-dump "optimized" } }
|