From bb1c16b8a37784e9a13c084206cc62e70564ba24 Mon Sep 17 00:00:00 2001 From: Jan Wassenberg Date: Mon, 4 May 2026 00:46:35 -0700 Subject: [PATCH] Attempted workaround for GCC PPC EMU128 test failure, refs #3024 Add Unpredictable1 instead of literal Also disable some aarch64 targets for compare_test to prevent OOM PiperOrigin-RevId: 909853992 --- hwy/tests/compare_test.cc | 6 ++++++ hwy/tests/memory_test.cc | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/hwy/tests/compare_test.cc b/hwy/tests/compare_test.cc index 5b30e4f881..4d4145c736 100644 --- a/hwy/tests/compare_test.cc +++ b/hwy/tests/compare_test.cc @@ -13,6 +13,12 @@ // See the License for the specific language governing permissions and // limitations under the License. +// Clang aarch64 OOM workaround: Not using AES, hence NEON_WITHOUT_AES is +// sufficient. SVE is mostly superseded by SVE2. +#ifndef HWY_DISABLED_TARGETS +#define HWY_DISABLED_TARGETS (HWY_NEON | HWY_SVE | HWY_SVE_256) +#endif // HWY_DISABLED_TARGETS + #undef HWY_TARGET_INCLUDE #define HWY_TARGET_INCLUDE "tests/compare_test.cc" #include "hwy/foreach_target.h" // IWYU pragma: keep diff --git a/hwy/tests/memory_test.cc b/hwy/tests/memory_test.cc index f7c64a9e64..eb29b6c429 100644 --- a/hwy/tests/memory_test.cc +++ b/hwy/tests/memory_test.cc @@ -149,14 +149,14 @@ struct TestLoadDup128 { constexpr size_t N128 = 16 / sizeof(T); alignas(16) T lanes[N128]; for (size_t i = 0; i < N128; ++i) { - lanes[i] = ConvertScalarTo(1 + i); + lanes[i] = ConvertScalarTo(hwy::Unpredictable1() + i); } const size_t N = Lanes(d); auto expected = AllocateAligned(N); HWY_ASSERT(expected); for (size_t i = 0; i < N; ++i) { - expected[i] = ConvertScalarTo(i % N128 + 1); + expected[i] = ConvertScalarTo(i % N128 + hwy::Unpredictable1()); } HWY_ASSERT_VEC_EQ(d, expected.get(), LoadDup128(d, lanes));