[Bug target/79127] [7 Regression] Error: invalid register for .seh_savexmm in matmul_i4.c
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79127 Jakub Jelinek changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|--- |FIXED --- Comment #16 from Jakub Jelinek --- The bootstrap should be fixed now, for the rest let's use PR65782.
[Bug target/79127] [7 Regression] Error: invalid register for .seh_savexmm in matmul_i4.c
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79127 Ian Harvey changed: What|Removed |Added CC||ian_harvey at bigpond dot com --- Comment #15 from Ian Harvey --- See also pr65782.
[Bug target/79127] [7 Regression] Error: invalid register for .seh_savexmm in matmul_i4.c
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79127 --- Comment #14 from Jakub Jelinek --- Author: jakub Date: Thu Jan 19 15:41:15 2017 New Revision: 244636 URL: https://gcc.gnu.org/viewcvs?rev=244636&root=gcc&view=rev Log: PR target/79127 * acinclude.m4 (LIBGFOR_CHECK_AVX512F): Ensure the test clobbers some zmm16+ registers to verify they are handled by unwind info properly if needed. * configure: Regenerated. Modified: trunk/libgfortran/ChangeLog trunk/libgfortran/acinclude.m4 trunk/libgfortran/configure
[Bug target/79127] [7 Regression] Error: invalid register for .seh_savexmm in matmul_i4.c
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79127 --- Comment #13 from Rainer Emrich --- The proposed patch indeed fixes the issue on x86_64-w64-mingw32, libgfortran builds again. The results of a complete testsuite run can be found here: https://gcc.gnu.org/ml/gcc-testresults/2017-01/msg01881.html Comparing the fortran results to an earlier run yields: 1704,1707c1727,1729 < # of expected passes 43782 < # of unexpected failures 266 < # of expected failures89 < # of unresolved testcases 1 --- > # of expected passes 44069 > # of unexpected failures 267 > # of expected failures92 IMHO that's fine.
[Bug target/79127] [7 Regression] Error: invalid register for .seh_savexmm in matmul_i4.c
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79127 --- Comment #12 from Jakub Jelinek --- On x86_64-linux and i686-linux it passed bootstrap/regtest and still defines HAVE_AVX512F, which is desirable there.
[Bug target/79127] [7 Regression] Error: invalid register for .seh_savexmm in matmul_i4.c
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79127 --- Comment #11 from Rainer Emrich --- (In reply to Jakub Jelinek from comment #10) > Note I have no access to any kind of Windows, so can just bootstrap/regtest > it on Linux to make sure it hasn't regressed anything there. I will test the patch in the next couple of hours.
[Bug target/79127] [7 Regression] Error: invalid register for .seh_savexmm in matmul_i4.c
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79127 --- Comment #10 from Jakub Jelinek --- Note I have no access to any kind of Windows, so can just bootstrap/regtest it on Linux to make sure it hasn't regressed anything there.
[Bug target/79127] [7 Regression] Error: invalid register for .seh_savexmm in matmul_i4.c
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79127 --- Comment #9 from Jakub Jelinek --- Created attachment 40536 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=40536&action=edit gcc7-pr79127.patch Untested patch that should make sure HAVE_AVX512F is not enabled if it will not work properly. Whether it is a problem with too old binutils, or even latest binutils don't support it, or a GCC bug in the SEH generation (how can the xmm16+ regs be expressed as saved there?) aside, this deals just with the libgfortran side.
[Bug target/79127] [7 Regression] Error: invalid register for .seh_savexmm in matmul_i4.c
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79127 --- Comment #8 from Rainer Emrich --- (In reply to Jakub Jelinek from comment #6) > Perhaps the HAVE_AVX512F configure test is too simple for the SEH purposes. > I've tried: > typedef double __m512d __attribute__ ((__vector_size__ (64))); > typedef double __m256d __attribute__ ((__vector_size__ (32))); > __m512d foo (__m512d, __m512d, __m512d, __m512d, __m512d, __m256d, > __m512d, __m512d); > __m512d _mm512_add (__m512d a, __m256d c) > { > __m512d b = __builtin_ia32_addpd512_mask (a, a, a, 1, 4); > __m512d f = __builtin_ia32_addpd512_mask (b, a, a, 1, 4); > __m512d g = __builtin_ia32_addpd512_mask (f, a, a, 1, 4); > __m512d h = __builtin_ia32_addpd512_mask (g, a, a, 1, 4); > __m512d e = foo (b, a, b, a, b, c, b, b); > return __builtin_ia32_addpd512_mask (b, e, a, 1, 4) + f + g + h; > } > int > main () > { > > ; > return 0; > } > > but that still doesn't generate any .seh_savexmm directives (at least not in > my cross-compiler). In my case HAVE_AVX512F is set to 1 in libgfortran/config.h.
[Bug target/79127] [7 Regression] Error: invalid register for .seh_savexmm in matmul_i4.c
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79127 --- Comment #7 from Rainer Emrich --- (In reply to Rainer Emrich from comment #5) > (In reply to Thomas Koenig from comment #1) > > Looks like the binutils on mingw is not able to handle AVX. > > > > I have to confess that I don't know a lot about binutil > > versions. Can you post the version that you use? > > And is it possible to attach the assembly file that is generated? > > The used binutils version is 2.25. > > I try 2.27 at the moment. Same issue.
[Bug target/79127] [7 Regression] Error: invalid register for .seh_savexmm in matmul_i4.c
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79127 --- Comment #6 from Jakub Jelinek --- Perhaps the HAVE_AVX512F configure test is too simple for the SEH purposes. I've tried: typedef double __m512d __attribute__ ((__vector_size__ (64))); typedef double __m256d __attribute__ ((__vector_size__ (32))); __m512d foo (__m512d, __m512d, __m512d, __m512d, __m512d, __m256d, __m512d, __m512d); __m512d _mm512_add (__m512d a, __m256d c) { __m512d b = __builtin_ia32_addpd512_mask (a, a, a, 1, 4); __m512d f = __builtin_ia32_addpd512_mask (b, a, a, 1, 4); __m512d g = __builtin_ia32_addpd512_mask (f, a, a, 1, 4); __m512d h = __builtin_ia32_addpd512_mask (g, a, a, 1, 4); __m512d e = foo (b, a, b, a, b, c, b, b); return __builtin_ia32_addpd512_mask (b, e, a, 1, 4) + f + g + h; } int main () { ; return 0; } but that still doesn't generate any .seh_savexmm directives (at least not in my cross-compiler).
[Bug target/79127] [7 Regression] Error: invalid register for .seh_savexmm in matmul_i4.c
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79127 --- Comment #5 from Rainer Emrich --- (In reply to Thomas Koenig from comment #1) > Looks like the binutils on mingw is not able to handle AVX. > > I have to confess that I don't know a lot about binutil > versions. Can you post the version that you use? > And is it possible to attach the assembly file that is generated? The used binutils version is 2.25. I try 2.27 at the moment.
[Bug target/79127] [7 Regression] Error: invalid register for .seh_savexmm in matmul_i4.c
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79127 --- Comment #4 from Rainer Emrich --- Created attachment 40534 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=40534&action=edit assembly Here's the assembly. AFAICS the issue is in matmul_i4_avx512f.
[Bug target/79127] [7 Regression] Error: invalid register for .seh_savexmm in matmul_i4.c
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79127 --- Comment #3 from Jakub Jelinek --- Can you please perhaps attach the assembly (so that we can find out if it is reported in the avx, avx2 or avx512f routines (or all of them))?
[Bug target/79127] [7 Regression] Error: invalid register for .seh_savexmm in matmul_i4.c
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79127 --- Comment #2 from Jakub Jelinek --- If this is indeed something that older versions of binutils don't handle and latest binutils do, then we probably need to reduce the assembly into a small testcase (or corresponding C) and include that in configure as another test for whether we should do the target cloning. But first we need to know if the assembly gcc emits is valid. I know nothing about SEH.