+2017-05-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
+
+ * acinclude.m4 (LIBGFOR_CHECK_FMA3): Use test from
+ check_effective_target_fma in gcc.target/i386/i386.exp.
+ (LIBGFOR_CHECK_FMA4): Use test from check_effective_target_fma4.
+ * configure: Regenerate.
+
2017-05-26 Thomas Koenig <tkoenig@gcc.gnu.org>
PR boostrap/80889
ac_save_CFLAGS="$CFLAGS"
CFLAGS="-O2 -mfma -mno-fma4"
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
- float
- flt_mul_add (float a, float b, float c)
+ typedef float __m128 __attribute__ ((__vector_size__ (16)));
+ typedef float __v4sf __attribute__ ((__vector_size__ (16)));
+ __m128 _mm_macc_ps(__m128 __A, __m128 __B, __m128 __C)
{
- return __builtin_fmaf (a, b, c);
+ return (__m128) __builtin_ia32_vfmaddps ((__v4sf)__A,
+ (__v4sf)__B,
+ (__v4sf)__C);
}]], [[]])],
AC_DEFINE(HAVE_FMA3, 1,
[Define if FMA3 instructions can be compiled.]),
ac_save_CFLAGS="$CFLAGS"
CFLAGS="-O2 -mfma4 -mno-fma"
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
- float
- flt_mul_add (float a, float b, float c)
+ typedef float __m128 __attribute__ ((__vector_size__ (16)));
+ typedef float __v4sf __attribute__ ((__vector_size__ (16)));
+ __m128 _mm_macc_ps(__m128 __A, __m128 __B, __m128 __C)
{
- return __builtin_fmaf (a, b, c);
+ return (__m128) __builtin_ia32_vfmaddps ((__v4sf)__A,
+ (__v4sf)__B,
+ (__v4sf)__C);
}]], [[]])],
AC_DEFINE(HAVE_FMA4, 1,
[Define if FMA4 instructions can be compiled.]),
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
- float
- flt_mul_add (float a, float b, float c)
+ typedef float __m128 __attribute__ ((__vector_size__ (16)));
+ typedef float __v4sf __attribute__ ((__vector_size__ (16)));
+ __m128 _mm_macc_ps(__m128 __A, __m128 __B, __m128 __C)
{
- return __builtin_fmaf (a, b, c);
+ return (__m128) __builtin_ia32_vfmaddps ((__v4sf)__A,
+ (__v4sf)__B,
+ (__v4sf)__C);
}
int
main ()
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
- float
- flt_mul_add (float a, float b, float c)
+ typedef float __m128 __attribute__ ((__vector_size__ (16)));
+ typedef float __v4sf __attribute__ ((__vector_size__ (16)));
+ __m128 _mm_macc_ps(__m128 __A, __m128 __B, __m128 __C)
{
- return __builtin_fmaf (a, b, c);
+ return (__m128) __builtin_ia32_vfmaddps ((__v4sf)__A,
+ (__v4sf)__B,
+ (__v4sf)__C);
}
int
main ()