Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gcc 11 with -O2 + aarch64: x86/avx512/subs/emul/{c,cpp}, x86/sse2/emul/{c,cpp} failures #720

Closed
junaruga opened this issue Mar 8, 2021 · 2 comments

Comments

@junaruga
Copy link
Collaborator

junaruga commented Mar 8, 2021

On the latest master branch commit: df63f88a364da6be3963b4924c327b12f88d7748 with gcc 11 with the following flags on Fedora rawhide (= 35) aarch64 (ARM 64-bit), I faced the following failures. This failures do not happen with the gcc 11 without flags (no CFLAGS and no CXXFLAGS).

Could you take a look? Thanks.

+ CC='gcc -fno-strict-aliasing'
+ CXX='g++ -fno-strict-aliasing'
+ CFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  -mbranch-protection=standard -fasynchronous-unwind-tables -fstack-clash-protection'
+ CXXFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  -mbranch-protection=standard -fasynchronous-unwind-tables -fstack-clash-protection'
+ meson setup build/gcc-with-flags
The Meson build system
Version: 0.57.1
Source dir: /builddir/build/BUILD/simde-df63f88a364da6be3963b4924c327b12f88d7748
Build dir: /builddir/build/BUILD/simde-df63f88a364da6be3963b4924c327b12f88d7748/build/gcc-with-flags
Build type: native build
Project name: SIMDe
Project version: 0.7.3
C compiler for the host machine: gcc -fno-strict-aliasing (gcc 11.0.0 "gcc (GCC) 11.0.0 20210210 (Red Hat 11.0.0-0)")
C linker for the host machine: gcc -fno-strict-aliasing ld.bfd 2.35.1-34
C++ compiler for the host machine: g++ -fno-strict-aliasing (gcc 11.0.0 "g++ (GCC) 11.0.0 20210210 (Red Hat 11.0.0-0)")
C++ linker for the host machine: g++ -fno-strict-aliasing ld.bfd 2.35.1-34
Host machine cpu family: aarch64
Host machine cpu: aarch64
Library m found: YES
Compiler for C supports arguments -fopenmp-simd: YES 
Compiler for C++ supports arguments -fopenmp-simd: YES 
Compiler for C supports arguments -Wpsabi: YES 
Compiler for C++ supports arguments -Wpsabi: YES 
Library m found: YES
Build targets in project: 882
Found ninja-1.10.2 at /usr/bin/ninja

+ ninja -C build/gcc-with-flags -v -j 4

+ meson test -C build/gcc-with-flags -q --no-rebuild --print-errorlogs
▶ 276/882 subs/mm512_subs_epu8             FAIL          
▶ 276/882 subs/mm512_mask_subs_epu8        FAIL          
▶ 276/882 subs/mm512_maskz_subs_epu8       FAIL          
276/882 x86/avx512/subs/emul/c             ERROR           0.05s   exit status 1
>>> MALLOC_PERTURB_=154 /builddir/build/BUILD/simde-df63f88a364da6be3963b4924c327b12f88d7748/build/gcc-with-flags/test/x86/avx512/subs-emul-c
――――――――――――――――――――――――――――――――――――― ✀  ―――――――――――――――――――――――――――――――――――――
stderr:
../../test/x86/avx512/subs.c:1988: assertion failed: r[2] == test_vec[i].r[2] (214 == 0)
../../test/x86/avx512/subs.c:2527: assertion failed: r[1] == test_vec[i].r[1] (195 == 0)
../../test/x86/avx512/subs.c:2937: assertion failed: r[2] == test_vec[i].r[2] (181 == 0)
(test program exited with status code 1)
――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――
▶ 281/882 subs/mm512_subs_epu8             FAIL          
▶ 281/882 subs/mm512_mask_subs_epu8        FAIL          
▶ 281/882 subs/mm512_maskz_subs_epu8       FAIL          
281/882 x86/avx512/subs/emul/cpp           ERROR           0.07s   exit status 1
>>> MALLOC_PERTURB_=50 /builddir/build/BUILD/simde-df63f88a364da6be3963b4924c327b12f88d7748/build/gcc-with-flags/test/x86/avx512/subs-emul-cpp
――――――――――――――――――――――――――――――――――――― ✀  ―――――――――――――――――――――――――――――――――――――
stderr:
test/x86/avx512/subs.cpp:1988: assertion failed: r[2] == test_vec[i].r[2] (214 == 0)
test/x86/avx512/subs.cpp:2527: assertion failed: r[1] == test_vec[i].r[1] (195 == 0)
test/x86/avx512/subs.cpp:2937: assertion failed: r[2] == test_vec[i].r[2] (181 == 0)
(test program exited with status code 1)
――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――
▶ 311/882 sse2/mm_subs_epu8                FAIL          
▶ 312/882 sse2/mm_subs_epu8                FAIL          
311/882 x86/sse2/emul/c                    ERROR           0.10s   exit status 1
>>> MALLOC_PERTURB_=63 /builddir/build/BUILD/simde-df63f88a364da6be3963b4924c327b12f88d7748/build/gcc-with-flags/test/x86/sse2-emul-c
――――――――――――――――――――――――――――――――――――― ✀  ―――――――――――――――――――――――――――――――――――――
stderr:
../../test/x86/sse2.c:9184: assertion failed: r[4] == test_vec[i].r[4] (185 == 0)
(test program exited with status code 1)
――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――
312/882 x86/sse2/emul/cpp                  ERROR           0.11s   exit status 1
>>> MALLOC_PERTURB_=41 /builddir/build/BUILD/simde-df63f88a364da6be3963b4924c327b12f88d7748/build/gcc-with-flags/test/x86/sse2-emul-cpp
――――――――――――――――――――――――――――――――――――― ✀  ―――――――――――――――――――――――――――――――――――――
stderr:
test/x86/sse2.cpp:9184: assertion failed: r[4] == test_vec[i].r[4] (185 == 0)
(test program exited with status code 1)
――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――
Summary of Failures:
276/882 x86/avx512/subs/emul/c             ERROR           0.05s   exit status 1
281/882 x86/avx512/subs/emul/cpp           ERROR           0.07s   exit status 1
311/882 x86/sse2/emul/c                    ERROR           0.10s   exit status 1
312/882 x86/sse2/emul/cpp                  ERROR           0.11s   exit status 1
Ok:                 878 
Expected Fail:      0   
Fail:               4   
Unexpected Pass:    0   
Skipped:            0   
Timeout:            0   
@junaruga junaruga changed the title gcc-11 with flags + aarch64: x86/avx512/subs/emul/{c,cpp}, x86/sse2/emul/{c,cpp} failures gcc 11 with flags + aarch64: x86/avx512/subs/emul/{c,cpp}, x86/sse2/emul/{c,cpp} failures Mar 8, 2021
@junaruga junaruga changed the title gcc 11 with flags + aarch64: x86/avx512/subs/emul/{c,cpp}, x86/sse2/emul/{c,cpp} failures gcc 11 with -O2 + aarch64: x86/avx512/subs/emul/{c,cpp}, x86/sse2/emul/{c,cpp} failures Mar 25, 2021
@junaruga
Copy link
Collaborator Author

This issue also happens on gcc 11 with only -O2 flag (CFLAGS="-O2", CXXFLAGS="-O2").

nemequ added a commit that referenced this issue Mar 25, 2021
I came across this because the old code caused problems in GCC 11 on
AArch64, but this is a substantial improvement anyways.

Fixes #720
@nemequ nemequ closed this as completed in 09d725d Mar 26, 2021
@junaruga
Copy link
Collaborator Author

Thanks! I confirmed it was fixed on the latest master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant