This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Darwin, PPC, testsuite, committed] Fix fail for bmi2-bzhi64-1a.c

This test is failing with older cpus because the included header needs both
altivec and vsx to be enabled to succeed in compiling.  Without this (if these
are not defaults for the cpu) there are errors like:

In file included from ... x86intrin.h:41,
                 from ... bmi2-bzhi64-1a.c:6:
 ... xmmintrin.h: In function '_mm_loadu_ps':
 ... xmmintrin.h:122:11: 
error: incompatible types when returning type 'int' but '__m128' {aka '__vector(4) float'} was expected
 ... xmmintrin.h: In function '_mm_cvtps_pi32':
 ... xmmintrin.h:996:3: 
error: use of 'long long' in AltiVec types is invalid without '-mvsx'

Fixed by adding -maltivec -mvsx to the options.

tested on powerpc-darwin, powerpc-linux-gnu
applied to mainline,


2019-07-27  Iain Sandoe  <>

	* Add options to enable altivec
	and vsx.

diff --git a/gcc/testsuite/ b/gcc/testsuite/
index 149cbc5d41..89bee61f04 100644
--- a/gcc/testsuite/
+++ b/gcc/testsuite/
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-O3" } */
+/* { dg-options "-O3 -maltivec -mvsx" } */
 /* { dg-require-effective-target lp64 } */

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]