1 /* { dg-additional-options "-mavx2" { target avx_runtime } } */
6 struct C
{ int r
, i
; };
7 struct C a
[N
], b
[N
], c
[N
], d
[N
], e
[N
];
9 __attribute__((noipa
)) static void
10 foo (struct C
*__restrict x
, struct C
*__restrict y
, struct C
*__restrict z
, int w
)
13 for (int i
= 0; i
< w
; i
++)
15 z
[i
].r
= x
[i
].r
* y
[-1 - i
].r
- x
[i
].i
* y
[-1 - i
].i
;
16 z
[i
].i
= x
[i
].i
* y
[-1 - i
].r
+ x
[i
].r
* y
[-1 - i
].i
;
20 __attribute__((noipa
)) static void
21 bar (struct C
*__restrict x
, struct C
*__restrict y
, struct C
*__restrict z
, int w
)
24 for (int i
= 0; i
< w
; i
++)
26 z
[i
].r
= x
[i
].r
* y
[i
].r
- x
[i
].i
* y
[i
].i
;
27 z
[i
].i
= x
[i
].i
* y
[i
].r
+ x
[i
].r
* y
[i
].i
;
36 for (i
= 0; i
< N
; ++i
)
38 a
[i
].r
= N
- i
; a
[i
].i
= i
- N
;
39 b
[i
].r
= i
- N
; b
[i
].i
= i
+ N
;
40 c
[i
].r
= -1 - i
; c
[i
].i
= 2 * N
- 1 - i
;
45 for (i
= 0; i
< N
; ++i
)
46 if (d
[i
].r
!= e
[i
].r
|| d
[i
].i
!= e
[i
].i
)