Haswell kernels fail with GCC 15
After applying #844 the x86_64 build fails with pre-release GCC 15 like this:
Compiling obj/intel64/kernels/haswell/3/sup/bli_gemmsup_rv_haswell_asm_d6x8m.o ('haswell' CFLAGS for kernels)
kernels/haswell/3/sup/bli_gemmsup_rv_haswell_asm_d6x8m.c: In function ‘bli_dgemmsup_rv_
haswell_asm_6x6m’:
kernels/haswell/3/sup/bli_gemmsup_rv_haswell_asm_d6x8m.c:1763:1: error: bp cannot be us
ed in ‘asm’ here
1763 | }
| ^
compilation terminated due to -Wfatal-errors.
6x8m.o] Error 1
Compiling obj/intel64/kernels/haswell/3/sup/bli_gemmsup_rv_haswell_asm_d6x8n.o ('haswell' CFLAGS for kernels)
kernels/haswell/3/sup/bli_gemmsup_rv_haswell_asm_d6x8n.c: In function ‘bli_dgemmsup_rv_haswell_asm_6x8n’:
kernels/haswell/3/sup/bli_gemmsup_rv_haswell_asm_d6x8n.c:948:1: error: bp cannot be used in ‘asm’ here
948 | }
| ^
compilation terminated due to -Wfatal-errors.
make: *** [Makefile:755: obj/intel64/kernels/haswell/3/sup/bli_gemmsup_rv_haswell_asm_d6x8n.o] Error 1
Compiling obj/intel64/kernels/haswell/3/sup/bli_gemmsup_rv_haswell_asm_s6x16m.o ('haswell' CFLAGS for kernels)
kernels/haswell/3/sup/bli_gemmsup_rv_haswell_asm_s6x16m.c: In function ‘bli_sgemmsup_rv_haswell_asm_6x12m’:
kernels/haswell/3/sup/bli_gemmsup_rv_haswell_asm_s6x16m.c:1985:1: error: bp cannot be used in ‘asm’ here
1985 | }
| ^
compilation terminated due to -Wfatal-errors.
make: *** [Makefile:755: obj/intel64/kernels/haswell/3/sup/bli_gemmsup_rv_haswell_asm_s6x16m.o] Error 1
Compiling obj/intel64/kernels/haswell/3/sup/bli_gemmsup_rv_haswell_asm_s6x16n.o ('haswell' CFLAGS for kernels)
kernels/haswell/3/sup/bli_gemmsup_rv_haswell_asm_s6x16n.c: In function ‘bli_sgemmsup_rv
_haswell_asm_6x16n’:
kernels/haswell/3/sup/bli_gemmsup_rv_haswell_asm_s6x16n.c:1083:1: error: bp cannot be u
sed in ‘asm’ here
1083 | }
| ^
compilation terminated due to -Wfatal-errors.
make: *** [Makefile:755: obj/intel64/kernels/haswell/3/sup/bli_gemmsup_rv_haswell_asm_s6x16n.o] Error 1
I think we have to just bite the bullet and take rbp out of all the gemmsup kernels.
These kernels will build on GCC 15.1 with the option -fno-tree-slp-vectorize . One way to accomplish this is to put
#pragma GCC optimize("-fno-tree-slp-vectorize")
at the top of affected kernel source files.
@chillenb I like this suggestion. Will implement shortly.
@loveshack @chillenb please try the linked PR. I can verify the fix with gcc 15.1 on Zen3 (but running with haswell kernels).
Works for me too, on consumer Haswell (Coffee Lake) with gcc 15.1.1. The fast test suite passes but I haven't run the long one.