Skip to content

Commit 82e07e5

Browse files
committed
Revert "pythongh-129987: Disable GCC SLP autovectorization for the interpreter loop on x86-64 (python#132295)"
This reverts commit 1f5682f.
1 parent ebf955d commit 82e07e5

File tree

1 file changed

+1
-16
lines changed

1 file changed

+1
-16
lines changed

Python/ceval.c

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -976,27 +976,12 @@ _PyObjectArray_Free(PyObject **array, PyObject **scratch)
976976
#include "generated_cases.c.h"
977977
#endif
978978

979-
#if (defined(__GNUC__) && __GNUC__ >= 10 && !defined(__clang__)) && defined(__x86_64__)
980-
/*
981-
* gh-129987: The SLP autovectorizer can cause poor code generation for
982-
* opcode dispatch in some GCC versions (observed in GCCs 12 through 15,
983-
* probably caused by https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115777),
984-
* negating any benefit we get from vectorization elsewhere in the
985-
* interpreter loop. Disabling it significantly affected older GCC versions
986-
* (prior to GCC 9, 40% performance drop), so we have to selectively disable
987-
* it.
988-
*/
989-
#define DONT_SLP_VECTORIZE __attribute__((optimize ("no-tree-slp-vectorize")))
990-
#else
991-
#define DONT_SLP_VECTORIZE
992-
#endif
993-
994979
typedef struct {
995980
_PyInterpreterFrame frame;
996981
_PyStackRef stack[1];
997982
} _PyEntryFrame;
998983

999-
PyObject* _Py_HOT_FUNCTION DONT_SLP_VECTORIZE
984+
PyObject* _Py_HOT_FUNCTION
1000985
_PyEval_EvalFrameDefault(PyThreadState *tstate, _PyInterpreterFrame *frame, int throwflag)
1001986
{
1002987
_Py_EnsureTstateNotNULL(tstate);

0 commit comments

Comments
 (0)