Skip to content

Commit

Permalink
arm neon ld2: silence warnings at -O3 on gcc risc-v
Browse files Browse the repository at this point in the history
  • Loading branch information
mr-c committed Nov 11, 2023
1 parent aba26f6 commit 8f56628
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 1 deletion.
8 changes: 7 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,12 @@ jobs:
arch_gnu: riscv64
arch_deb: riscv64
distro: ubuntu-22.04
- extra: -O3
version: 12
cross: riscv64
arch_gnu: riscv64
arch_deb: riscv64
distro: ubuntu-22.04
- version: 12
cross: s390x
arch_gnu: s390x
Expand Down Expand Up @@ -376,7 +382,7 @@ jobs:
run: |
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
- name: Configure
run: meson setup --cross-file=docker/cross-files/${{ matrix.cross }}-gcc-${{ matrix.version }}-ccache.cross build
run: meson setup --cross-file=docker/cross-files/${{ matrix.cross }}-gcc-${{ matrix.version }}${{ matrix.extra}}-ccache.cross build
- name: Build
run: ninja -C build -v
- name: Test
Expand Down
18 changes: 18 additions & 0 deletions docker/cross-files/riscv64-gcc-12-O3-ccache.cross
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
[binaries]
c = ['ccache', 'riscv64-linux-gnu-gcc-12']
cpp = ['ccache', 'riscv64-linux-gnu-g++-12']
ar = 'riscv64-linux-gnu-ar'
strip = 'riscv64-linux-gnu-strip'
objcopy = 'riscv64-linux-gnu-objcopy'
ld = 'riscv64-linux-gnu-ld'
exe_wrapper = ['qemu-riscv64-static', '-L', '/usr/riscv64-linux-gnu/']

[properties]
c_args = ['-Wextra', '-Werror', '-O3']
cpp_args = ['-Wextra', '-Werror', '-O3']

[host_machine]
system = 'linux'
cpu_family = 'riscv64'
cpu = 'riscv64'
endian = 'little'
28 changes: 28 additions & 0 deletions simde/arm/neon/ld2.h
Original file line number Diff line number Diff line change
Expand Up @@ -447,6 +447,10 @@ simde_vld2q_s8(int8_t const ptr[HEDLEY_ARRAY_PARAM(32)]) {
simde_vld1q_s8(&(ptr[16]))
);
#else
#if defined(SIMDE_DIAGNOSTIC_DISABLE_UNINITIALIZED_) && HEDLEY_GCC_VERSION_CHECK(12,0,0) && defined(SIMDE_ARCH_RISCV64)
HEDLEY_DIAGNOSTIC_PUSH
SIMDE_DIAGNOSTIC_DISABLE_UNINITIALIZED_
#endif
simde_int8x16_private r_[2];

for (size_t i = 0 ; i < (sizeof(r_) / sizeof(r_[0])) ; i++) {
Expand All @@ -461,6 +465,9 @@ simde_vld2q_s8(int8_t const ptr[HEDLEY_ARRAY_PARAM(32)]) {
} };

return r;
#if defined(SIMDE_DIAGNOSTIC_DISABLE_UNINITIALIZED_) && HEDLEY_GCC_VERSION_CHECK(12,0,0) && defined(SIMDE_ARCH_RISCV64)
HEDLEY_DIAGNOSTIC_POP
#endif
#endif
}
#if defined(SIMDE_ARM_NEON_A32V7_ENABLE_NATIVE_ALIASES)
Expand Down Expand Up @@ -520,6 +527,10 @@ simde_vld2q_s16(int16_t const ptr[HEDLEY_ARRAY_PARAM(16)]) {
simde_vld1q_s16(&(ptr[8]))
);
#else
#if defined(SIMDE_DIAGNOSTIC_DISABLE_UNINITIALIZED_) && HEDLEY_GCC_VERSION_CHECK(12,0,0) && defined(SIMDE_ARCH_RISCV64)
HEDLEY_DIAGNOSTIC_PUSH
SIMDE_DIAGNOSTIC_DISABLE_UNINITIALIZED_
#endif
simde_int16x8_private r_[2];

for (size_t i = 0 ; i < (sizeof(r_) / sizeof(r_[0])) ; i++) {
Expand All @@ -534,6 +545,9 @@ simde_vld2q_s16(int16_t const ptr[HEDLEY_ARRAY_PARAM(16)]) {
} };

return r;
#if defined(SIMDE_DIAGNOSTIC_DISABLE_UNINITIALIZED_) && HEDLEY_GCC_VERSION_CHECK(12,0,0) && defined(SIMDE_ARCH_RISCV64)
HEDLEY_DIAGNOSTIC_POP
#endif
#endif
}
#if defined(SIMDE_ARM_NEON_A32V7_ENABLE_NATIVE_ALIASES)
Expand Down Expand Up @@ -580,6 +594,10 @@ simde_vld2q_u8(uint8_t const ptr[HEDLEY_ARRAY_PARAM(32)]) {
simde_vld1q_u8(&(ptr[16]))
);
#else
#if defined(SIMDE_DIAGNOSTIC_DISABLE_UNINITIALIZED_) && HEDLEY_GCC_VERSION_CHECK(12,0,0) && defined(SIMDE_ARCH_RISCV64)
HEDLEY_DIAGNOSTIC_PUSH
SIMDE_DIAGNOSTIC_DISABLE_UNINITIALIZED_
#endif
simde_uint8x16_private r_[2];

for (size_t i = 0 ; i < (sizeof(r_) / sizeof(r_[0])) ; i++) {
Expand All @@ -594,6 +612,9 @@ simde_vld2q_u8(uint8_t const ptr[HEDLEY_ARRAY_PARAM(32)]) {
} };

return r;
#if defined(SIMDE_DIAGNOSTIC_DISABLE_UNINITIALIZED_) && HEDLEY_GCC_VERSION_CHECK(12,0,0) && defined(SIMDE_ARCH_RISCV64)
HEDLEY_DIAGNOSTIC_POP
#endif
#endif
}
#if defined(SIMDE_ARM_NEON_A32V7_ENABLE_NATIVE_ALIASES)
Expand All @@ -613,6 +634,10 @@ simde_vld2q_u16(uint16_t const ptr[HEDLEY_ARRAY_PARAM(16)]) {
simde_vld1q_u16(&(ptr[8]))
);
#else
#if defined(SIMDE_DIAGNOSTIC_DISABLE_UNINITIALIZED_) && HEDLEY_GCC_VERSION_CHECK(12,0,0) && defined(SIMDE_ARCH_RISCV64)
HEDLEY_DIAGNOSTIC_PUSH
SIMDE_DIAGNOSTIC_DISABLE_UNINITIALIZED_
#endif
simde_uint16x8_private r_[2];

for (size_t i = 0 ; i < (sizeof(r_) / sizeof(r_[0])) ; i++) {
Expand All @@ -627,6 +652,9 @@ simde_vld2q_u16(uint16_t const ptr[HEDLEY_ARRAY_PARAM(16)]) {
} };

return r;
#if defined(SIMDE_DIAGNOSTIC_DISABLE_UNINITIALIZED_) && HEDLEY_GCC_VERSION_CHECK(12,0,0) && defined(SIMDE_ARCH_RISCV64)
HEDLEY_DIAGNOSTIC_POP
#endif
#endif
}
#if defined(SIMDE_ARM_NEON_A32V7_ENABLE_NATIVE_ALIASES)
Expand Down

0 comments on commit 8f56628

Please sign in to comment.