/* Test whether using target specific options, we can use the x86 builtin
functions in functions with the appropriate function specific options. */
/* { dg-do compile } */
+/* { dg-skip-if "" { i?86-*-* x86_64-*-* } { "-march=*" } { "-march=k8" } } */
/* { dg-options "-O2 -march=k8 -mfpmath=sse" } */
typedef float __m128 __attribute__ ((__vector_size__ (16), __may_alias__));
#error "-msse3 should not be set for this test"
#endif
-__m128d sse3_hsubpd (__m128d a, __m128d b) __attribute__((__option__("sse3")));
+__m128d sse3_hsubpd (__m128d a, __m128d b) __attribute__((__target__("sse3")));
__m128d generic_hsubpd (__m128d a, __m128d b);
__m128d
#error "-mssse3 should not be set for this test"
#endif
-__m128w ssse3_psignd128 (__m128w a, __m128w b) __attribute__((__option__("ssse3")));
+__m128w ssse3_psignd128 (__m128w a, __m128w b) __attribute__((__target__("ssse3")));
__m128w generic_psignd (__m128w ab, __m128w b);
__m128w
#error "-msse4.1 should not be set for this test"
#endif
-__m128d sse4_1_blendvpd (__m128d a, __m128d b, __m128d c) __attribute__((__option__("sse4.1")));
+__m128d sse4_1_blendvpd (__m128d a, __m128d b, __m128d c) __attribute__((__target__("sse4.1")));
__m128d generic_blendvpd (__m128d a, __m128d b, __m128d c);
__m128d
#error "-msse4.2 should not be set for this test"
#endif
-__m128i sse4_2_pcmpgtq (__m128i a, __m128i b) __attribute__((__option__("sse4.2")));
+__m128i sse4_2_pcmpgtq (__m128i a, __m128i b) __attribute__((__target__("sse4.2")));
__m128i generic_pcmpgtq (__m128i ab, __m128i b);
__m128i
#error "-msse4a should not be set for this test"
#endif
-__m128i sse4_2_insertq (__m128i a, __m128i b) __attribute__((__option__("sse4a")));
+__m128i sse4_2_insertq (__m128i a, __m128i b) __attribute__((__target__("sse4a")));
__m128i generic_insertq (__m128i ab, __m128i b);
__m128i
return __builtin_ia32_insertq (a, b); /* { dg-error "needs isa option" } */
}
-#ifdef __SSE5__
-#error "-msse5 should not be set for this test"
+#ifdef __FMA4__
+#error "-mfma4 should not be set for this test"
#endif
-__m128d sse5_fmaddpd (__m128d a, __m128d b, __m128d c) __attribute__((__option__("sse5")));
+__m128d fma4_fmaddpd (__m128d a, __m128d b, __m128d c) __attribute__((__target__("fma4")));
__m128d generic_fmaddpd (__m128d a, __m128d b, __m128d c);
__m128d
-sse5_fmaddpd (__m128d a, __m128d b, __m128d c)
+fma4_fmaddpd (__m128d a, __m128d b, __m128d c)
{
- return __builtin_ia32_fmaddpd (a, b, c);
+ return __builtin_ia32_vfmaddpd (a, b, c);
}
__m128d
generic_fmaddpd (__m128d a, __m128d b, __m128d c)
{
- return __builtin_ia32_fmaddpd (a, b, c); /* { dg-error "needs isa option" } */
+ return __builtin_ia32_vfmaddpd (a, b, c); /* { dg-error "needs isa option" } */
}
#ifdef __AES__
#error "-maes should not be set for this test"
#endif
-__m128i aes_aesimc128 (__m128i a) __attribute__((__option__("aes")));
+__m128i aes_aesimc128 (__m128i a) __attribute__((__target__("aes")));
__m128i generic_aesimc128 (__m128i a);
__m128i
#error "-mpclmul should not be set for this test"
#endif
-__m128i pclmul_pclmulqdq128 (__m128i a, __m128i b) __attribute__((__option__("pclmul")));
+__m128i pclmul_pclmulqdq128 (__m128i a, __m128i b) __attribute__((__target__("pclmul")));
__m128i generic_pclmulqdq128 (__m128i a, __m128i b);
__m128i