Skip to content

Commit 5c2b22d

Browse files
Update Haswell gemmsup fix for gcc 16 and later. (#891)
Details: - The problem persists with gcc16 so enable the fix for gcc15 *and later* (thanks @negril). - Disable all vectorization, not just SLP vectorization (thanks @thesamesam).
1 parent 358e689 commit 5c2b22d

File tree

5 files changed

+18
-20
lines changed

5 files changed

+18
-20
lines changed

CREDITS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ but many others have contributed code, ideas, and feedback, including
6464
Aaron Hutchinson @Aaron-Hutchinson (SiFive)
6565
Francisco Igual @figual (Universidad Complutense de Madrid)
6666
@j-bm
67+
Sam James @thesamesam
6768
Madeesh Kannan @shadeMe
6869
Tony Kelman @tkelman
6970
Lee Killough @leekillough (Tactical Computing Labs)
@@ -149,6 +150,7 @@ but many others have contributed code, ideas, and feedback, including
149150
Chenhan Yu @ChenhanYu (The University of Texas at Austin)
150151
Roman Yurchak @rth (Symerio)
151152
Stefano Zampini @stefanozampini
153+
Paul Zander @negril
152154
M. Zhou @cdluminate
153155
Igor Zhuravlov @jip (Far Eastern Federal University)
154156
@AngryLoki

kernels/haswell/3/sup/bli_gemmsup_rv_haswell_asm_d6x8m.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,10 @@
3333
3434
*/
3535

36-
// This avoids a known issue with GCC15 ("error: bp cannot be used in asm here", #845).
37-
// Only check for version 15 since this may be fixed in 16 (**fingers crossed**), and also
38-
// make sure the compiler isn't clang since it also confusingly defines __GNUC__
39-
#if !defined(__clang__) && defined(__GNUC__) && __GNUC__ == 15
40-
#pragma GCC optimize("-fno-tree-slp-vectorize")
36+
// This avoids a known issue with GCC15+ ("error: bp cannot be used in asm here", #845).
37+
// Make sure the compiler isn't clang since it also confusingly defines __GNUC__
38+
#if !defined(__clang__) && defined(__GNUC__) && __GNUC__ >= 15
39+
#pragma GCC optimize("-fno-tree-vectorize")
4140
#endif
4241

4342
#include "blis.h"

kernels/haswell/3/sup/bli_gemmsup_rv_haswell_asm_d6x8n.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,10 @@
3333
3434
*/
3535

36-
// This avoids a known issue with GCC15 ("error: bp cannot be used in asm here", #845).
37-
// Only check for version 15 since this may be fixed in 16 (**fingers crossed**), and also
38-
// make sure the compiler isn't clang since it also confusingly defines __GNUC__
39-
#if !defined(__clang__) && defined(__GNUC__) && __GNUC__ == 15
40-
#pragma GCC optimize("-fno-tree-slp-vectorize")
36+
// This avoids a known issue with GCC15+ ("error: bp cannot be used in asm here", #845).
37+
// Make sure the compiler isn't clang since it also confusingly defines __GNUC__
38+
#if !defined(__clang__) && defined(__GNUC__) && __GNUC__ >= 15
39+
#pragma GCC optimize("-fno-tree-vectorize")
4140
#endif
4241

4342
#include "blis.h"

kernels/haswell/3/sup/bli_gemmsup_rv_haswell_asm_s6x16m.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,10 @@
3333
3434
*/
3535

36-
// This avoids a known issue with GCC15 ("error: bp cannot be used in asm here", #845).
37-
// Only check for version 15 since this may be fixed in 16 (**fingers crossed**), and also
38-
// make sure the compiler isn't clang since it also confusingly defines __GNUC__
39-
#if !defined(__clang__) && defined(__GNUC__) && __GNUC__ == 15
40-
#pragma GCC optimize("-fno-tree-slp-vectorize")
36+
// This avoids a known issue with GCC15+ ("error: bp cannot be used in asm here", #845).
37+
// Make sure the compiler isn't clang since it also confusingly defines __GNUC__
38+
#if !defined(__clang__) && defined(__GNUC__) && __GNUC__ >= 15
39+
#pragma GCC optimize("-fno-tree-vectorize")
4140
#endif
4241

4342
#include "blis.h"

kernels/haswell/3/sup/bli_gemmsup_rv_haswell_asm_s6x16n.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,10 @@
3333
3434
*/
3535

36-
// This avoids a known issue with GCC15 ("error: bp cannot be used in asm here", #845).
37-
// Only check for version 15 since this may be fixed in 16 (**fingers crossed**), and also
38-
// make sure the compiler isn't clang since it also confusingly defines __GNUC__
39-
#if !defined(__clang__) && defined(__GNUC__) && __GNUC__ == 15
40-
#pragma GCC optimize("-fno-tree-slp-vectorize")
36+
// This avoids a known issue with GCC15+ ("error: bp cannot be used in asm here", #845).
37+
// Make sure the compiler isn't clang since it also confusingly defines __GNUC__
38+
#if !defined(__clang__) && defined(__GNUC__) && __GNUC__ >= 15
39+
#pragma GCC optimize("-fno-tree-vectorize")
4140
#endif
4241

4342
#include "blis.h"

0 commit comments

Comments
 (0)