diff options
author | Richard Sandiford <richard.sandiford@arm.com> | 2025-04-10 21:09:07 +0100 |
---|---|---|
committer | Richard Sandiford <richard.sandiford@arm.com> | 2025-04-10 21:09:07 +0100 |
commit | 733a6a4c1115080a0ee3cf7e6678c0fb9ffd0a56 (patch) | |
tree | 858b517567a132c4d0b38765d3957d1331de7698 /libjava/classpath/java | |
parent | 493974aa0ad8b94dbeb61f00d2acc57c94fd4809 (diff) | |
download | gcc-733a6a4c1115080a0ee3cf7e6678c0fb9ffd0a56.zip gcc-733a6a4c1115080a0ee3cf7e6678c0fb9ffd0a56.tar.gz gcc-733a6a4c1115080a0ee3cf7e6678c0fb9ffd0a56.tar.bz2 |
libgomp: Update SVE tests
The new SVE tests didn't explicitly force SVE to be enabled,
which meant that they wouldn't work on targets that aren't
configured for SVE by default. The least invasive way of
fixing that is to add a pragma, which works for most tests.
However, for udr-sve.c, the global:
#pragma omp declare reduction (+:svint32_t: omp_out = svadd_s32_z (svptrue_b32(), omp_in, omp_out)) \
initializer (omp_priv = svindex_s32 (0, 0))
does not work with an earlier:
#pragma GCC target "+sve"
which is interesting, and maybe worthy of a PR if there isn't one
already. It seems we have to force SVE (and thus an architecture)
on the command line instead.
However, with that fixed, udr-sve.c fails execution. One problem
seems to be a missing accumulation in for_reduction. Fixing that
is enough to reach the final inscan_reduction_incl, but that fails
for reasons I haven't investigated yet. I would need to read up
more to understand what the loop is doing.
It also looks like there might be a missing "+" in simd_reduction:
#pragma omp simd reduction (+:va, i)
for (j = 0; j < 16; j++)
va = svld1_s32 (svptrue_b32 (), a);
res = svaddv_s32 (svptrue_b32 (), va);
if (res != 8)
__builtin_abort ();
since AFAICT the loop is not doing a reduction as things stand.
But perhaps that's deliberate, since it does match the != 8 test.
libgomp/
* testsuite/libgomp.c-target/aarch64/firstprivate.c: Add +sve pragma.
* testsuite/libgomp.c-target/aarch64/lastprivate.c: Likewise.
* testsuite/libgomp.c-target/aarch64/private.c: Likewise.
* testsuite/libgomp.c-target/aarch64/shared.c: Likewise.
* testsuite/libgomp.c-target/aarch64/simd-aligned.c: Likewise.
* testsuite/libgomp.c-target/aarch64/simd-nontemporal.c: Likewise.
* testsuite/libgomp.c-target/aarch64/threadprivate.c: Likewise.
* testsuite/libgomp.c-target/aarch64/udr-sve.c: Add an -march option.
(for_reduction): Use "+=" in the reduction loop.
Diffstat (limited to 'libjava/classpath/java')
0 files changed, 0 insertions, 0 deletions