Skip to content

Commit e768493

Browse files
jan-wassenbergcopybara-github
authored andcommitted
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: 908194619
1 parent 5c7030c commit e768493

2 files changed

Lines changed: 8 additions & 2 deletions

File tree

hwy/tests/compare_test.cc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,12 @@
1313
// See the License for the specific language governing permissions and
1414
// limitations under the License.
1515

16+
// Clang aarch64 OOM workaround: Not using AES, hence NEON_WITHOUT_AES is
17+
// sufficient. SVE is mostly superseded by SVE2.
18+
#ifndef HWY_DISABLED_TARGETS
19+
#define HWY_DISABLED_TARGETS (HWY_NEON | HWY_SVE | HWY_SVE_256)
20+
#endif // HWY_DISABLED_TARGETS
21+
1622
#undef HWY_TARGET_INCLUDE
1723
#define HWY_TARGET_INCLUDE "tests/compare_test.cc"
1824
#include "hwy/foreach_target.h" // IWYU pragma: keep

hwy/tests/memory_test.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,14 +149,14 @@ struct TestLoadDup128 {
149149
constexpr size_t N128 = 16 / sizeof(T);
150150
alignas(16) T lanes[N128];
151151
for (size_t i = 0; i < N128; ++i) {
152-
lanes[i] = ConvertScalarTo<T>(1 + i);
152+
lanes[i] = ConvertScalarTo<T>(hwy::Unpredictable1() + i);
153153
}
154154

155155
const size_t N = Lanes(d);
156156
auto expected = AllocateAligned<T>(N);
157157
HWY_ASSERT(expected);
158158
for (size_t i = 0; i < N; ++i) {
159-
expected[i] = ConvertScalarTo<T>(i % N128 + 1);
159+
expected[i] = ConvertScalarTo<T>(i % N128 + hwy::Unpredictable1());
160160
}
161161

162162
HWY_ASSERT_VEC_EQ(d, expected.get(), LoadDup128(d, lanes));

0 commit comments

Comments
 (0)