gcc/testsuite/gcc.target/i386/pr116512.c
raw| 1 | /* { dg-do compile } */ |
| 2 | /* { dg-options "-march=x86-64-v4 -O2" } */ |
| 3 | /* { dg-final { scan-assembler-not "vzeroupper" { target { ! ia32 } } } } */ |
| 4 | |
| 5 | #include <immintrin.h> |
| 6 | |
| 7 | struct B { |
| 8 | union { |
| 9 | __m512 f; |
| 10 | __m512i s; |
| 11 | }; |
| 12 | }; |
| 13 | |
| 14 | struct B foo(int n) { |
| 15 | struct B res; |
| 16 | res.s = _mm512_set1_epi32(n); |
| 17 | |
| 18 | return res; |
| 19 | } |
| 20 | |
| 21 | __m512i bar(int n) { |
| 22 | struct B res; |
| 23 | res.s = _mm512_set1_epi32(n); |
| 24 | |
| 25 | return res.s; |
| 26 | } |