Test failures on PPC64 with GCC 15 (Power9 baseline)
Hi,
On the upcoming Ubuntu 25.10, when compiling and running highway using the Power9 baseline with GCC 15, we get the following failures:
The following tests FAILED:
405 - HwyRandomTestGroup/HwyRandomTest.TestSeeding/PPC9 # GetParam() = 281474976710656 (ILLEGAL)
406 - HwyRandomTestGroup/HwyRandomTest.TestMultiThreadSeeding/PPC9 # GetParam() = 281474976710656 (ILLEGAL)
407 - HwyRandomTestGroup/HwyRandomTest.TestRandomUint64/PPC9 # GetParam() = 281474976710656 (ILLEGAL)
408 - HwyRandomTestGroup/HwyRandomTest.TestNextNRandomUint64/PPC9 # GetParam() = 281474976710656 (ILLEGAL)
409 - HwyRandomTestGroup/HwyRandomTest.TestNextFixedNRandomUint64/PPC9 # GetParam() = 281474976710656 (ILLEGAL)
410 - HwyRandomTestGroup/HwyRandomTest.TestCachedXorshiro/PPC9 # GetParam() = 281474976710656 (ILLEGAL)
411 - HwyRandomTestGroup/HwyRandomTest.TestUniformDist/PPC9 # GetParam() = 281474976710656 (ILLEGAL)
412 - HwyRandomTestGroup/HwyRandomTest.TestNextNUniformDist/PPC9 # GetParam() = 281474976710656 (ILLEGAL)
413 - HwyRandomTestGroup/HwyRandomTest.TestNextFixedNUniformDist/PPC9 # GetParam() = 281474976710656 (ILLEGAL)
414 - HwyRandomTestGroup/HwyRandomTest.TestUniformCachedXorshiro/PPC9 # GetParam() = 281474976710656 (ILLEGAL)
Tests run fine if we either drop back to -mcpu=power8 or use GCC 14.
The issue appears both in our packaged version and in a fresh git clone.
Ubuntu bug: https://bugs.launchpad.net/ubuntu/+source/highway/+bug/2121375
Thanks for raising the issue. Do I understand correctly (from Heinrich's GCC bug report) that these errors are resolved by the Highway commit "pre-release workaround for PPC TestIntegerMaskedDiv: Unpredictable1"? If so, would be good to raise a GCC bug for that as well - very likely a compiler bug (Our workaround prevents the compiler from evaluating the expression at compile time).
Is the issue here that we want to build a pre-1.3.0 version of Highway with GCC 15? We generally recommend using the latest release if that's feasible.
I think there's some confusion here, most likely because we've been dealing with a series of build failures in a single bug on the Ubuntu bug.
Heinrich is dealing with a RISCV internal compiler error. It probably doesn't have anything to do with the failure at hand, which is on the IBM PowerPC architecture. Sadly, the commit you mention doesn't fix the issue, since it was already on the main branch by the time I tested on a fresh git clone.
My educated guess is that it's a bug in the GCC codegen, but I don't really have the time to dig into it, especially since I don't know much about either the GCC codebase, Highway, or PPC64LE. I did ping some folks internally that could lend a hand, though.
Got it. Thanks for pinging. Given that it worked in gcc 14, a compiler bug is quite likely.
It would be an option to (temporarily) disable POWER9 codegen on GCC 15 if that's helpful.
Please also consider filing this as a GCC bug.