@@ -107,23 +107,6 @@ AM_CONDITIONAL(QUAD, test "$ok" = "yes")
107
107
AC_SUBST ( PRECISION )
108
108
AC_SUBST ( CHECK_PL_OPTS )
109
109
110
- AC_ARG_ENABLE ( sse , [ AC_HELP_STRING ([ --enable-sse] ,[ enable SSE optimizations] )] , have_sse=$enableval , have_sse=no )
111
- if test "$have_sse" = "yes"; then
112
- if test "$PRECISION" != "s"; then
113
- AC_MSG_ERROR ( [ SSE requires single precision] )
114
- fi
115
- fi
116
-
117
- AC_ARG_ENABLE ( sse2 , [ AC_HELP_STRING ([ --enable-sse2] ,[ enable SSE/SSE2 optimizations] )] , have_sse2=$enableval , have_sse2=no )
118
- if test "$have_sse" = "yes"; then have_sse2=yes; fi
119
- if test "$have_sse2" = "yes"; then
120
- AC_DEFINE ( HAVE_SSE2 ,1 ,[ Define to enable SSE/SSE2 optimizations.] )
121
- if test "$PRECISION" != "d" -a "$PRECISION" != "s"; then
122
- AC_MSG_ERROR ( [ SSE2 requires single or double precision] )
123
- fi
124
- fi
125
- AM_CONDITIONAL(HAVE_SSE2, test "$have_sse2" = "yes")
126
-
127
110
AC_ARG_ENABLE ( avx , [ AC_HELP_STRING ([ --enable-avx] ,[ enable AVX optimizations] )] , have_avx=$enableval , have_avx=no )
128
111
if test "$have_avx" = "yes"; then
129
112
AC_DEFINE ( HAVE_AVX ,1 ,[ Define to enable AVX optimizations.] )
@@ -153,6 +136,29 @@ if test "$have_avx512" = "yes"; then
153
136
fi
154
137
AM_CONDITIONAL(HAVE_AVX512, test "$have_avx512" = "yes")
155
138
139
+ dnl Process SSE/SSE2 after AVX, so we can enable the shorter-length vectors too.
140
+ dnl All AVX-capable platforms, including AVX-512, support the old SSE instructions.
141
+ AC_ARG_ENABLE ( sse , [ AC_HELP_STRING ([ --enable-sse] ,[ enable SSE optimizations] )] , have_sse=$enableval , have_sse=no )
142
+ if test "$have_sse" = "yes"; then
143
+ if test "$PRECISION" != "s"; then
144
+ AC_MSG_ERROR ( [ SSE requires single precision] )
145
+ fi
146
+ fi
147
+
148
+ AC_ARG_ENABLE ( sse2 , [ AC_HELP_STRING ([ --enable-sse2] ,[ enable SSE/SSE2 optimizations] )] , have_sse2=$enableval , have_sse2=no )
149
+ if test "$have_sse" = "yes"; then have_sse2=yes; fi
150
+ if test "$have_avx" = "yes"; then have_sse2=yes; fi
151
+ if test "$have_avx2" = "yes"; then have_sse2=yes; fi
152
+ if test "$have_avx512" = "yes"; then have_sse2=yes; fi
153
+ if test "$have_sse2" = "yes"; then
154
+ AC_DEFINE ( HAVE_SSE2 ,1 ,[ Define to enable SSE/SSE2 optimizations.] )
155
+ if test "$PRECISION" != "d" -a "$PRECISION" != "s"; then
156
+ AC_MSG_ERROR ( [ SSE2 requires single or double precision] )
157
+ fi
158
+ fi
159
+ AM_CONDITIONAL(HAVE_SSE2, test "$have_sse2" = "yes")
160
+
161
+
156
162
AC_ARG_ENABLE ( kcvi , [ AC_HELP_STRING ([ --enable-kcvi] ,[ enable Knights Corner vector instructions optimizations] )] , have_kcvi=$enableval , have_kcvi=no )
157
163
if test "$have_kcvi" = "yes"; then
158
164
AC_DEFINE ( HAVE_KCVI ,1 ,[ Define to enable KCVI optimizations.] )
0 commit comments