Debian Codegraph @

gcc/testsuite/gcc.target/i386/avx10_2-vmovd-1.c

raw
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -march=x86-64-v3 -mavx10.2" } */
3 /* { dg-final { scan-assembler-times "vmovd\t\[0-9\]+\\(%e\[bs\]p\\), %xmm0" 1 { target ia32 } } } */
4 /* { dg-final { scan-assembler-times "vmovss\t\[0-9\]+\\(%e\[bs\]p\\), %xmm0" 1 { target ia32 } } } */
5 /* { dg-final { scan-assembler-times "vmovd\t%xmm0, %xmm0" 3 { target ia32 } } } */
6 /* { dg-final { scan-assembler-times "vmovd\t%edi, %xmm0" 1 { target { ! ia32 } } } } */
7 /* { dg-final { scan-assembler-times "vmovd\t%xmm0, %xmm0" 4 { target { ! ia32 } } } } */
8
9
10 #include<immintrin.h>
11
12 typedef int v4si __attribute__((vector_size(16)));
13 typedef float v4sf __attribute__((vector_size(16)));
14
15 v4si
16 __attribute__((noipa, unused))
17 f1 (int a)
18 {
19 return __extension__(v4si){a, 0, 0, 0};
20 }
21
22 v4sf
23 __attribute__((noipa, unused))
24 f2 (float a)
25 {
26 return __extension__(v4sf){a, 0, 0, 0};
27 }
28
29 v4si
30 __attribute__((noipa, unused))
31 f3 (v4si a)
32 {
33 return __extension__(v4si){a[0], 0, 0, 0};
34 }
35
36 v4sf
37 __attribute__((noipa, unused))
38 f4 (v4sf a)
39 {
40 return __extension__(v4sf){a[0], 0, 0, 0};
41 }
42
43 __m128i
44 __attribute__((noipa, unused))
45 f5 (__m128i a)
46 {
47 return _mm_set_epi32 (0, 0, 0,((__v4si)a)[0]);
48 }