Jeffrey Walton via llvm-dev
2019-Oct-24 07:56 UTC
[llvm-dev] Failed PPC64 compile when using Power7 loads and stores?
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
Jinsong Ji via llvm-dev
2019-Oct-24 18:22 UTC
[llvm-dev] Failed PPC64 compile when using Power7 loads and stores?
Looks like to me that your clang is too old. clang version 3.8.0-2ubuntu4 (tags/RELEASE_380/final) clang 3.8.0 was released on 08 Mar 2016. While vec_xl was added in https://reviews.llvm.org/rL286455 onNov 11 2016, which is around half an year later then 3.8.0. Can you please try using newer clang. Best, Jinsong Ji (纪金松), PhD. XL/LLVM on Power Compiler Development E-mail: jji at us.ibm.com From: Jeffrey Walton via llvm-dev <llvm-dev at lists.llvm.org> To: llvm-dev <llvm-dev at lists.llvm.org> Date: 10/24/2019 03:57 AM Subject: [EXTERNAL] [llvm-dev] Failed PPC64 compile when using Power7 loads and stores? Sent by: "llvm-dev" <llvm-dev-bounces at lists.llvm.org> Hi Everyone, I'm having trouble figuring out a compile failure on ppc64le. The failure is at https://urldefense.proofpoint.com/v2/url?u=https-3A__travis-2Dci.org_noloader_cryptopp-2Dautotools_jobs_602187190&d=DwIGaQ&c=jf_iaSHvJObTbx-siA1ZOg&r=DvnnfavFQBGT2CDyHzTr_Q&m=LV-QC2ULb1l_TJNYncN26RBH_VkkgB6tcuocCCH4A3c&s=dBo7cPVsSszL2_MFYtvZssY5WX73ptFjjXwiV65rLOs&e . 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 _______________________________________________ LLVM Developers mailing list llvm-dev at lists.llvm.org https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.llvm.org_cgi-2Dbin_mailman_listinfo_llvm-2Ddev&d=DwIGaQ&c=jf_iaSHvJObTbx-siA1ZOg&r=DvnnfavFQBGT2CDyHzTr_Q&m=LV-QC2ULb1l_TJNYncN26RBH_VkkgB6tcuocCCH4A3c&s=hAqWBC680OQ19EdHBXN6fTQs5Vi9E_m-PL8kYOZqdsw&e -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20191024/f02bc262/attachment.html> -------------- next part -------------- A non-text attachment was scrubbed... Name: graycol.gif Type: image/gif Size: 105 bytes Desc: not available URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20191024/f02bc262/attachment.gif>
Jeffrey Walton via llvm-dev
2019-Oct-24 18:34 UTC
[llvm-dev] Failed PPC64 compile when using Power7 loads and stores?
On Thu, Oct 24, 2019 at 2:22 PM Jinsong Ji <jji at us.ibm.com> wrote:> Looks like to me that your clang is too old. > > clang version 3.8.0-2ubuntu4 (tags/RELEASE_380/final) > > clang 3.8.0 was released on 08 Mar 2016. > > While vec_xl was added in https://reviews.llvm.org/rL286455 onNov 11 > 2016, which is around half an year later then 3.8.0. > > Can you please try using newer clang. >Thanks. Travis does not allow an upgrade of the compiler in this instance. I already tried. Do you know where Clang keeps its documentation? I found https://releases.llvm.org/3.8.1/tools/docs/UsersManual.html#powerpc, but it lacks detail. Thanks for your help. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20191024/895403f5/attachment.html> -------------- next part -------------- A non-text attachment was scrubbed... Name: graycol.gif Type: image/gif Size: 105 bytes Desc: not available URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20191024/895403f5/attachment.gif>