Update Power7 tests for Clang

Clang 3.4 and 3.8 are resiting the builtins
This commit is contained in:
Jeffrey Walton 2019-10-24 05:18:12 -04:00
parent 743cb6a0e6
commit 20d3db813b
No known key found for this signature in database
GPG Key ID: B36AB348921B1838
2 changed files with 14 additions and 6 deletions

View File

@ -1,13 +1,21 @@
#ifdef __GNUC__
# pragma GCC diagnostic ignored "-Wdeprecated"
#endif
#include <altivec.h>
int main(int argc, char* argv[])
{
#if defined(_ARCH_PWR7)
__vector unsigned int x = {1, 2};
__vector unsigned int y = vec_add(x, vec_ld(0, (__vector unsigned int*)argv[0]));
__vector unsigned int a = {1,2,3,4};
__vector unsigned int b = vec_ld(0, (__vector unsigned int*)argv[0]);
__vector unsigned int c = vec_xor(a, b);
__vector unsigned int x = {5,6,7,8};
__vector unsigned int y = vec_xl(0, (__vector unsigned int*)argv[0]);
__vector unsigned int z = vec_xor(x, y);
# if defined(__VSX__)
__vector unsigned long long xx = (__vector unsigned long long)x;
__vector unsigned long long yy = (__vector unsigned long long)y;
__vector unsigned long long xx = {1,2};
__vector unsigned long long yy = vec_xl(0, (__vector unsigned long long*)argv[0]);
__vector unsigned long long zz = vec_xor(xx, yy);
# endif
#else

View File

@ -78,8 +78,8 @@
#endif
// IBM XLC on AIX does not define __VSX__ with -qarch=pwr7
// or with -qarch=pwr8. The manual says it is available with
// the architectures; see XL C: Compiler Reference p. 104.
// or -qarch=pwr8. The manual says it is available with the
// architectures; see XL C: Compiler Reference p. 104.
#if defined(_AIX) && (defined(_ARCH_PWR7) || defined(_ARCH_PWR8)) && defined(__xlC__)
# undef __VSX__
# define __VSX__ 1