152
|
1 /* { dg-do compile { target aarch64*-*-* } } */
|
|
2 /* { dg-options "-O2 -ftree-loop-vectorize -funsafe-math-optimizations -march=armv8.2-a+sve -msve-vector-bits=256" } */
|
|
3
|
|
4 float
|
|
5 foo(long n, float *x, int inc_x,
|
|
6 float *y, int inc_y)
|
|
7 {
|
|
8 float dot = 0.0;
|
|
9 int ix = 0, iy = 0;
|
|
10
|
|
11 if (n < 0) {
|
|
12 return dot;
|
|
13 }
|
|
14
|
|
15 int i = 0;
|
|
16 while (i < n) {
|
|
17 dot += y[iy] * x[ix];
|
|
18 ix += inc_x;
|
|
19 iy += inc_y;
|
|
20 i++;
|
|
21 }
|
|
22
|
|
23 return dot;
|
|
24 }
|
|
25
|
|
26 /* { dg-final { scan-assembler-not "smaddl" { target aarch64*-*-* } } } */
|