File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed
Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -948,11 +948,14 @@ _PyObjectArray_Free(PyObject **array, PyObject **scratch)
948948#include "generated_cases.c.h"
949949#endif
950950
951- #if (defined(__GNUC__ ) && !defined(__clang__ )) && defined(__x86_64__ )
951+ #if (defined(__GNUC__ ) && __GNUC__ >= 10 && !defined(__clang__ )) && defined(__x86_64__ )
952952/*
953- * gh-129987: The SLP autovectorizer can cause poor code generation for opcode
954- * dispatch, negating any benefit we get from vectorization elsewhere in the
955- * interpreter loop.
953+ * gh-129987: The SLP autovectorizer can cause poor code generation for
954+ * opcode dispatch in some GCC versions (observed in GCCs 12 through 15),
955+ * negating any benefit we get from vectorization elsewhere in the
956+ * interpreter loop. Disabling it significantly affected older GCC versions
957+ * (prior to GCC 9, 40% performance drop), so we have to selectively disable
958+ * it.
956959 */
957960#define DONT_SLP_VECTORIZE __attribute__((optimize ("no-tree-slp-vectorize")))
958961#else
You can’t perform that action at this time.
0 commit comments