[llvm-dev] Failed PPC64 compile when using Power7 loads and stores?
Jeffrey Walton via llvm-dev
llvm-dev at lists.llvm.org
Thu Oct 24 00:56:16 PDT 2019
Hi Everyone,
I'm having trouble figuring out a compile failure on ppc64le. The
failure is at https://travis-ci.org/noloader/cryptopp-autotools/jobs/602187190
. The message is:
/bin/bash ./libtool --tag=CXX --mode=compile clang++
-DHAVE_CONFIG_H -I. -DCRYPTOPP_DISABLE_POWER8 -pipe -mcpu=power7
-mvsx -maltivec -g -O2 -MT libppc_power7_la-ppc_power7.lo -MD -MP -MF
.deps/libppc_power7_la-ppc_power7.Tpo -c -o
libppc_power7_la-ppc_power7.lo `test -f 'ppc_power7.cpp' || echo
'./'`ppc_power7.cpp
ppc_power7.cpp:71:21: error: use of undeclared identifier 'vec_xl'
vec_xst(vec_xl(0, (__vector unsigned int*)(b1+3)), 0, (__vec...
The source file includes <altivec.h>. The source file is compiled with
-mcpu=power7 -mvsx -maltivec.
==========
Here is the source code of interest:
// POWER7 added unaligned loads and store operations
byte b1[19] = {255, 255, 255, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}, b2[17];
#if defined(_ARCH_PWR7) && defined(__xlC__)
// Workaround XL C++
vec_xst(vec_xl(0, (unsigned int*)(b1+3)), 0, (unsigned int*)(b2+1));
#elif defined(_ARCH_PWR7)
vec_xst(vec_xl(0, (__vector unsigned int*)(b1+3)), 0, (__vector
unsigned int*)(b2+1));
#else
std::memset(b2, 0x00, sizeof(b2));
#endif
result = (0 == std::memcmp(b1+3, b2+1, 16));
Why is the file failing to compile?
==========
Here are some details of the host:
Operating System Details
Distributor ID: Ubuntu
Description: Ubuntu 16.04.6 LTS
Release: 16.04
Codename: xenial
...
OS/Arch: linux/ppc64le
clang version 3.8.0-2ubuntu4 (tags/RELEASE_380/final)
==========
Compile is OK on my old PowerMac G5, GCC112 and GCC119 from the
compile farm. Unfortunately, the compile farm only tests GCC and XLC.
The Clang compiler does not work.
Thanks in advance.
Jeff
More information about the llvm-dev
mailing list