From 5bca9dd45379f452bd90d946ed5ad4d9a87ac4e2 Mon Sep 17 00:00:00 2001 From: Iain Sandoe Date: Sat, 27 Jul 2019 07:43:15 +0000 Subject: [PATCH] [Darwin, PPC, testsuite] 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. gcc/testsuite/ 2019-07-27 Iain Sandoe * gcc.target/powerpc/bmi2-bzhi64-1a.c: Add options to enable altivec and vsx. From-SVN: r273844 --- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/gcc.target/powerpc/bmi2-bzhi64-1a.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 5bdbabb895f..7527e730263 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2019-07-27 Iain Sandoe + + * gcc.target/powerpc/bmi2-bzhi64-1a.c: Add options to enable altivec + and vsx. + 2019-07-26 Iain Sandoe * lib/scanasm.exp (object-size): Handle Darwin's size command. diff --git a/gcc/testsuite/gcc.target/powerpc/bmi2-bzhi64-1a.c b/gcc/testsuite/gcc.target/powerpc/bmi2-bzhi64-1a.c index 149cbc5d416..89bee61f044 100644 --- a/gcc/testsuite/gcc.target/powerpc/bmi2-bzhi64-1a.c +++ b/gcc/testsuite/gcc.target/powerpc/bmi2-bzhi64-1a.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O3" } */ +/* { dg-options "-O3 -maltivec -mvsx" } */ /* { dg-require-effective-target lp64 } */ #define NO_WARN_X86_INTRINSICS 1 -- 2.30.2