1 /* { dg-do compile } */
2 /* { dg-options "-O2 -Werror-implicit-function-declaration -march=k8 -m3dnow -msse4 -msse5 -maes -mpclmul" } */
6 /* Test that the intrinsics compile with optimization. All of them are
7 defined as inline functions in {,x,e,p,t,s,w,a,b}mmintrin.h and mm3dnow.h
8 that reference the proper builtin functions. Defining away "extern" and
9 "__inline" results in all of them being compiled as proper functions. */
14 /* Following intrinsics require immediate arguments. */
17 #define __builtin_ia32_extrqi(X, I, L) __builtin_ia32_extrqi(X, 1, 1)
18 #define __builtin_ia32_insertqi(X, Y, I, L) __builtin_ia32_insertqi(X, Y, 1, 1)
21 #define __builtin_ia32_aeskeygenassist128(X, C) __builtin_ia32_aeskeygenassist128(X, 1)
22 #define __builtin_ia32_pclmulqdq128(X, Y, I) __builtin_ia32_pclmulqdq128(X, Y, 1)
24 /* mmintrin-common.h */
25 #define __builtin_ia32_roundpd(V, M) __builtin_ia32_roundpd(V, 1)
26 #define __builtin_ia32_roundsd(D, V, M) __builtin_ia32_roundsd(D, V, 1)
27 #define __builtin_ia32_roundps(V, M) __builtin_ia32_roundps(V, 1)
28 #define __builtin_ia32_roundss(D, V, M) __builtin_ia32_roundss(D, V, 1)
31 #define __builtin_ia32_pblendw128(X, Y, M) __builtin_ia32_pblendw128 (X, Y, 1)
32 #define __builtin_ia32_blendps(X, Y, M) __builtin_ia32_blendps(X, Y, 1)
33 #define __builtin_ia32_blendpd(X, Y, M) __builtin_ia32_blendpd(X, Y, 1)
34 #define __builtin_ia32_dpps(X, Y, M) __builtin_ia32_dpps(X, Y, 1)
35 #define __builtin_ia32_dppd(X, Y, M) __builtin_ia32_dppd(X, Y, 1)
36 #define __builtin_ia32_insertps128(D, S, N) __builtin_ia32_insertps128(D, S, 1)
37 #define __builtin_ia32_vec_ext_v4sf(X, N) __builtin_ia32_vec_ext_v4sf(X, 1)
38 #define __builtin_ia32_vec_set_v16qi(D, S, N) __builtin_ia32_vec_set_v16qi(D, S, 1)
39 #define __builtin_ia32_vec_set_v4si(D, S, N) __builtin_ia32_vec_set_v4si(D, S, 1)
40 #define __builtin_ia32_vec_set_v2di(D, S, N) __builtin_ia32_vec_set_v2di(D, S, 1)
41 #define __builtin_ia32_vec_ext_v16qi(X, N) __builtin_ia32_vec_ext_v16qi(X, 1)
42 #define __builtin_ia32_vec_ext_v4si(X, N) __builtin_ia32_vec_ext_v4si(X, 1)
43 #define __builtin_ia32_vec_ext_v2di(X, N) __builtin_ia32_vec_ext_v2di(X, 1)
44 #define __builtin_ia32_mpsadbw128(X, Y, M) __builtin_ia32_mpsadbw128(X, Y, 1)
45 #define __builtin_ia32_pcmpistrm128(X, Y, M) \
46 __builtin_ia32_pcmpistrm128(X, Y, 1)
47 #define __builtin_ia32_pcmpistri128(X, Y, M) \
48 __builtin_ia32_pcmpistri128(X, Y, 1)
49 #define __builtin_ia32_pcmpestrm128(X, LX, Y, LY, M) \
50 __builtin_ia32_pcmpestrm128(X, LX, Y, LY, 1)
51 #define __builtin_ia32_pcmpestri128(X, LX, Y, LY, M) \
52 __builtin_ia32_pcmpestri128(X, LX, Y, LY, 1)
53 #define __builtin_ia32_pcmpistria128(X, Y, M) \
54 __builtin_ia32_pcmpistria128(X, Y, 1)
55 #define __builtin_ia32_pcmpistric128(X, Y, M) \
56 __builtin_ia32_pcmpistric128(X, Y, 1)
57 #define __builtin_ia32_pcmpistrio128(X, Y, M) \
58 __builtin_ia32_pcmpistrio128(X, Y, 1)
59 #define __builtin_ia32_pcmpistris128(X, Y, M) \
60 __builtin_ia32_pcmpistris128(X, Y, 1)
61 #define __builtin_ia32_pcmpistriz128(X, Y, M) \
62 __builtin_ia32_pcmpistriz128(X, Y, 1)
63 #define __builtin_ia32_pcmpestria128(X, LX, Y, LY, M) \
64 __builtin_ia32_pcmpestria128(X, LX, Y, LY, 1)
65 #define __builtin_ia32_pcmpestric128(X, LX, Y, LY, M) \
66 __builtin_ia32_pcmpestric128(X, LX, Y, LY, 1)
67 #define __builtin_ia32_pcmpestrio128(X, LX, Y, LY, M) \
68 __builtin_ia32_pcmpestrio128(X, LX, Y, LY, 1)
69 #define __builtin_ia32_pcmpestris128(X, LX, Y, LY, M) \
70 __builtin_ia32_pcmpestris128(X, LX, Y, LY, 1)
71 #define __builtin_ia32_pcmpestriz128(X, LX, Y, LY, M) \
72 __builtin_ia32_pcmpestriz128(X, LX, Y, LY, 1)
75 #define __builtin_ia32_palignr128(X, Y, N) __builtin_ia32_palignr128(X, Y, 8)
76 #define __builtin_ia32_palignr(X, Y, N) __builtin_ia32_palignr(X, Y, 8)
79 #define __builtin_ia32_psrldqi128(A, B) __builtin_ia32_psrldqi128(A, 8)
80 #define __builtin_ia32_pslldqi128(A, B) __builtin_ia32_pslldqi128(A, 8)
81 #define __builtin_ia32_pshufhw(A, N) __builtin_ia32_pshufhw(A, 0)
82 #define __builtin_ia32_pshuflw(A, N) __builtin_ia32_pshuflw(A, 0)
83 #define __builtin_ia32_pshufd(A, N) __builtin_ia32_pshufd(A, 0)
84 #define __builtin_ia32_vec_set_v8hi(A, D, N) \
85 __builtin_ia32_vec_set_v8hi(A, D, 0)
86 #define __builtin_ia32_vec_ext_v8hi(A, N) __builtin_ia32_vec_ext_v8hi(A, 0)
87 #define __builtin_ia32_shufpd(A, B, N) __builtin_ia32_shufpd(A, B, 0)
90 #define __builtin_prefetch(P, A, I) __builtin_prefetch(P, A, _MM_HINT_NTA)
91 #define __builtin_ia32_pshufw(A, N) __builtin_ia32_pshufw(A, 0)
92 #define __builtin_ia32_vec_set_v4hi(A, D, N) \
93 __builtin_ia32_vec_set_v4hi(A, D, 0)
94 #define __builtin_ia32_vec_ext_v4hi(A, N) __builtin_ia32_vec_ext_v4hi(A, 0)
95 #define __builtin_ia32_shufps(A, B, N) __builtin_ia32_shufps(A, B, 0)
98 #define __builtin_ia32_protbi(A, B) __builtin_ia32_protbi(A,1)
99 #define __builtin_ia32_protwi(A, B) __builtin_ia32_protwi(A,1)
100 #define __builtin_ia32_protdi(A, B) __builtin_ia32_protdi(A,1)
101 #define __builtin_ia32_protqi(A, B) __builtin_ia32_protqi(A,1)
103 #include <wmmintrin.h>
104 #include <bmmintrin.h>
105 #include <smmintrin.h>