diff mbox

Many testsuite failures on x86_64 due recent "fix" about f16cintrin.h header

Message ID 20111106201302.E57C13BE18@mailhost.lps.ens.fr
State New
Headers show

Commit Message

Dominique d'Humières Nov. 6, 2011, 8:13 p.m. UTC
Following http://gcc.gnu.org/ml/gcc-patches/2011-10/msg02901.html, I have applied
the following patch on x86_64-apple-darwin10


(the second part fixes a missing endif). However I still have most of the failures:

FAIL: gcc.target/i386/sse-14.c
Excess errors:
/opt/gcc/work/gcc/testsuite/gcc.target/i386/sse-14.c:95:1: error: implicit declaration of function '_cvtss_sh' [-Werror=implicit-function-declaration]
/opt/gcc/work/gcc/testsuite/gcc.target/i386/sse-14.c:96:1: error: implicit declaration of function '_mm_cvtps_ph' [-Werror=implicit-function-declaration]
/opt/gcc/work/gcc/testsuite/gcc.target/i386/sse-14.c:96:1: error: incompatible types when returning type 'int' but '__m128i' was expected
/opt/gcc/work/gcc/testsuite/gcc.target/i386/sse-14.c:97:1: error: implicit declaration of function '_mm256_cvtps_ph' [-Werror=implicit-function-declaration]
/opt/gcc/work/gcc/testsuite/gcc.target/i386/sse-14.c:97:1: error: incompatible types when returning type 'int' but '__m128i' was expected
...
FAIL: gcc.target/i386/testimm-1.c (test for excess errors)
Excess errors:
/opt/gcc/work/gcc/testsuite/gcc.target/i386/testimm-1.c:36:6: error: incompatible types when assigning to type '__m128i' from type 'int'
/opt/gcc/work/gcc/testsuite/gcc.target/i386/testimm-1.c:45:6: error: incompatible types when assigning to type '__m128i' from type 'int'

At this point I have no idea about how to fix those.

Cheers,

Dominique

Comments

Quentin Neill Nov. 7, 2011, 5:04 a.m. UTC | #1
On Sun, Nov 6, 2011 at 2:13 PM, Dominique Dhumieres <dominiq@lps.ens.fr> wrote:
> Following http://gcc.gnu.org/ml/gcc-patches/2011-10/msg02901.html, I have applied
> the following patch on x86_64-apple-darwin10
>
> --- ../_clean/gcc/config.gcc    2011-11-05 22:25:37.000000000 +0100
> +++ gcc/config.gcc      2011-11-06 12:35:57.000000000 +0100
> @@ -350,7 +350,7 @@ i[34567]86-*-*)
>                       immintrin.h x86intrin.h avxintrin.h xopintrin.h
>                       ia32intrin.h cross-stdarg.h lwpintrin.h popcntintrin.h
>                       lzcntintrin.h bmiintrin.h bmi2intrin.h tbmintrin.h
> -                      avx2intrin.h fmaintrin.h"
> +                      avx2intrin.h fmaintrin.h f16cintrin.h"
>        ;;
>  x86_64-*-*)
>        cpu_type=i386
> @@ -363,7 +363,7 @@ x86_64-*-*)
>                       immintrin.h x86intrin.h avxintrin.h xopintrin.h
>                       ia32intrin.h cross-stdarg.h lwpintrin.h popcntintrin.h
>                       lzcntintrin.h bmiintrin.h tbmintrin.h bmi2intrin.h
> -                      avx2intrin.h fmaintrin.h"
> +                      avx2intrin.h fmaintrin.h f16cintrin.h"
>        need_64bit_hwint=yes
>        ;;
>  ia64-*-*)
> --- ../_clean/gcc/config/i386/f16cintrin.h      2011-11-05 10:03:10.000000000 +0100
> +++ gcc/config/i386/f16cintrin.h        2011-11-06 16:55:05.000000000 +0100
> @@ -88,7 +88,8 @@ _mm256_cvtps_ph (__m256 __A, const int _
>
>  #define _mm256_cvtps_ph(A, I) \
>   ((__m128i) __builtin_ia32_vcvtps2ph256 ((__v8sf)(__m256) A, (int) (I)))
> -#endif
> +#endif /* __OPTIMIZE__ */
> +#endif /* _F16CINTRIN_H_INCLUDED */
>
>  #endif /* __F16C__ */
>  #endif
>
> (the second part fixes a missing endif). However I still have most of the failures:
>
> FAIL: gcc.target/i386/sse-14.c
> Excess errors:
> /opt/gcc/work/gcc/testsuite/gcc.target/i386/sse-14.c:95:1: error: implicit declaration of function '_cvtss_sh' [-Werror=implicit-function-declaration]
> /opt/gcc/work/gcc/testsuite/gcc.target/i386/sse-14.c:96:1: error: implicit declaration of function '_mm_cvtps_ph' [-Werror=implicit-function-declaration]
> /opt/gcc/work/gcc/testsuite/gcc.target/i386/sse-14.c:96:1: error: incompatible types when returning type 'int' but '__m128i' was expected
> /opt/gcc/work/gcc/testsuite/gcc.target/i386/sse-14.c:97:1: error: implicit declaration of function '_mm256_cvtps_ph' [-Werror=implicit-function-declaration]
> /opt/gcc/work/gcc/testsuite/gcc.target/i386/sse-14.c:97:1: error: incompatible types when returning type 'int' but '__m128i' was expected
> ...
> FAIL: gcc.target/i386/testimm-1.c (test for excess errors)
> Excess errors:
> /opt/gcc/work/gcc/testsuite/gcc.target/i386/testimm-1.c:36:6: error: incompatible types when assigning to type '__m128i' from type 'int'
> /opt/gcc/work/gcc/testsuite/gcc.target/i386/testimm-1.c:45:6: error: incompatible types when assigning to type '__m128i' from type 'int'
>
> At this point I have no idea about how to fix those.
>
> Cheers,
>
> Dominique

Thanks for the testing.
I committed the changes to add f16cintrin.h to config.gcc and added
the missing endif.
I'm not sure why my testing did not see the missing endif or the failures above.
My first guess would be that the missing endif was causing ifndef
guards to not work across other intrinsics headers, causing some
builtins not to be defined.
My test machine is down right now, but I will post a patch if I can
figure things out tonight.
diff mbox

Patch

--- ../_clean/gcc/config.gcc	2011-11-05 22:25:37.000000000 +0100
+++ gcc/config.gcc	2011-11-06 12:35:57.000000000 +0100
@@ -350,7 +350,7 @@  i[34567]86-*-*)
 		       immintrin.h x86intrin.h avxintrin.h xopintrin.h
 		       ia32intrin.h cross-stdarg.h lwpintrin.h popcntintrin.h
 		       lzcntintrin.h bmiintrin.h bmi2intrin.h tbmintrin.h
-		       avx2intrin.h fmaintrin.h"
+		       avx2intrin.h fmaintrin.h f16cintrin.h"
 	;;
 x86_64-*-*)
 	cpu_type=i386
@@ -363,7 +363,7 @@  x86_64-*-*)
 		       immintrin.h x86intrin.h avxintrin.h xopintrin.h
 		       ia32intrin.h cross-stdarg.h lwpintrin.h popcntintrin.h
 		       lzcntintrin.h bmiintrin.h tbmintrin.h bmi2intrin.h
-		       avx2intrin.h fmaintrin.h"
+		       avx2intrin.h fmaintrin.h f16cintrin.h"
 	need_64bit_hwint=yes
 	;;
 ia64-*-*)
--- ../_clean/gcc/config/i386/f16cintrin.h	2011-11-05 10:03:10.000000000 +0100
+++ gcc/config/i386/f16cintrin.h	2011-11-06 16:55:05.000000000 +0100
@@ -88,7 +88,8 @@  _mm256_cvtps_ph (__m256 __A, const int _
 
 #define _mm256_cvtps_ph(A, I) \
   ((__m128i) __builtin_ia32_vcvtps2ph256 ((__v8sf)(__m256) A, (int) (I)))
-#endif
+#endif /* __OPTIMIZE__ */
+#endif /* _F16CINTRIN_H_INCLUDED */
 
 #endif /* __F16C__ */
 #endif