This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/79395] New: Compile error with -mcpu=power9 and __builtin_vec_vcmpne_p
- From: "acsawdey at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 06 Feb 2017 19:39:49 +0000
- Subject: [Bug target/79395] New: Compile error with -mcpu=power9 and __builtin_vec_vcmpne_p
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79395
Bug ID: 79395
Summary: Compile error with -mcpu=power9 and
__builtin_vec_vcmpne_p
Product: gcc
Version: 7.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
Assignee: unassigned at gcc dot gnu.org
Reporter: acsawdey at gcc dot gnu.org
CC: kelvin at gcc dot gnu.org, wschmidt at gcc dot gnu.org
Target Milestone: ---
Target: powerpc64*-*-*
Testing with trunk and -mcpu=power9 we get the error below from a number of
tests in gcc.dg/vmx:
gcc/xgcc -Bgcc ../trunk/gcc/testsuite/gcc.dg/vmx/3d-01.c
-fno-diagnostics-show-caret -fdiagnostics-color=never -O0 -maltivec
-mabi=altivec -std=gnu99 -mno-vsx -S -mcpu=power9 -o
3d-01.s../trunk/gcc/testsuite/gcc.dg/vmx/3d-01.c: In function
âtest_vec_all_neâ:
../trunk/gcc/testsuite/gcc.dg/vmx/3d-01.c:71:3: error: Builtin function
__builtin_vec_vcmpne_p not supported in this compiler configuration
../trunk/gcc/testsuite/gcc.dg/vmx/3d-01.c: In function âtest_vec_any_eqâ:
../trunk/gcc/testsuite/gcc.dg/vmx/3d-01.c:78:3: error: Builtin function
__builtin_vec_vcmpne_p not supported in this compiler configuration
../trunk/gcc/testsuite/gcc.dg/vmx/3d-01.c: In function âtest_not_vec_all_neâ:
../trunk/gcc/testsuite/gcc.dg/vmx/3d-01.c:155:3: error: Builtin function
__builtin_vec_vcmpne_p not supported in this compiler configuration
../trunk/gcc/testsuite/gcc.dg/vmx/3d-01.c: In function âtest_not_vec_any_eqâ:
../trunk/gcc/testsuite/gcc.dg/vmx/3d-01.c:162:3: error: Builtin function
__builtin_vec_vcmpne_p not supported in this compiler configuration
This change makes the error go away but it may be removing other things that do
work properly:
Index: ../trunk/gcc/config/rs6000/altivec.h
===================================================================
--- ../trunk/gcc/config/rs6000/altivec.h (revision 245169)
+++ ../trunk/gcc/config/rs6000/altivec.h (working copy)
@@ -589,12 +589,9 @@
#ifdef _ARCH_PWR9
#define vec_all_nez(a1, a2) __builtin_vec_vcmpnez_p (__CR6_LT, (a1), (a2))
#define vec_any_eqz(a1, a2) __builtin_vec_vcmpnez_p (__CR6_LT_REV, (a1), (a2))
-#define vec_all_ne(a1, a2) __builtin_vec_vcmpne_p (__CR6_LT, (a1), (a2))
-#define vec_any_eq(a1, a2) __builtin_vec_vcmpne_p (__CR6_LT_REV, (a1), (a2))
-#else
+#endif
#define vec_all_ne(a1, a2) __builtin_vec_vcmpeq_p (__CR6_EQ, (a1), (a2))
#define vec_any_eq(a1, a2) __builtin_vec_vcmpeq_p (__CR6_EQ_REV, (a1), (a2))
-#endif
#define vec_any_ne(a1, a2) __builtin_vec_vcmpeq_p (__CR6_LT_REV, (a1), (a2))