1 /* { dg-do compile { target { { i?86-*-* x86_64-*-* } && ia32 } } } */
2 /* { dg-options "-O2 -ftree-vectorize -march=pentium4 -mfpmath=387" } */
3
4 struct A
5 {
6 float f, g, h, k;
AA7 A () {}
AA8 A (float v0, float x, float y) : f(v0), g(x), h(y), k(0.0f) {}
barA9 A bar (A &a, float t) { return A (f + a.f * t, g + a.g * t, h + a.h * t); }
10 };
11
12 A
baz(A & x,A & y,float t)13 baz (A &x, A &y, float t)
14 {
15 return x.bar (y, t);
16 }
17
18 A *
foo(A & s,A & t,A & u,A & v,int y,int z)19 foo (A &s, A &t, A &u, A &v, int y, int z)
20 {
21 A *x = new A[y * z];
22 for (int i = 0; i < 7; i++)
23 {
24 A s = baz (s, u, i / (float) z);
25 A t = baz (t, v, i / (float) z);
26 for (int j = 0; j < 7; j++)
27 x[i * y + j] = baz (s, t, j / (float) y);
28 }
29 return x;
30 }
31
32 /* { dg-final { scan-assembler-not "%mm" } } */
33