On 6 March 2018 at 18:53, Jens Axboe <axboe@xxxxxxxxx> wrote: > On 3/6/18 11:45 AM, Sitsofe Wheeler wrote: >> [...] >>> +########################################## >>> +# sse probe >>> +sse="no" >>> +cat > $TMPC << EOF >>> +#include <xmmintrin.h> >>> +#include <immintrin.h> >>> +int main(int argc, char **argv) >>> +{ >>> + __m128 val; >>> + float const *src = NULL; >>> + float *dst = NULL; >>> + val = _mm_load_ps(src); >>> + _mm_store_ps(dst, val); >>> + return 0; >>> +} >> >> We could try and use __builtin_ia32_addps (from >> https://gcc.gnu.org/onlinedocs/gcc/x86-Built-in-Functions.html#x86-Built-in-Functions > > Sure > >>> +EOF >>> +if test "$enable_sse" = "yes" && compile_prog "-msse" "" "sse"; then >>> + sse="yes" >>> +fi >>> +print_config "SSE (compiler)" "$sse" >> >> Here we wouldn't explicitly add -msse because we would have already >> added it to the global CFLAGS if forced or depended on the user's >> particular compiler flags if not. > > It's only enabled IFF the global flag (--enable-sse) is set AND the > configure test passes. Right and I'm saying change the how we add the flag and the configure test. If the user explicitly sets sse on the configure line then assume the user knows what they're doing and add it to the CFLAGS and but always detect (via comping a program that would only work if the user really had told the compiler to use SSE) if its already enabled later (rather than only if the user turned it on). My thinking is that platforms like x86_64 will nearly always have SSE so it would be nice to detect if the compiler somehow already has it on. -- Sitsofe | http://sucs.org/~sits/ -- To unsubscribe from this list: send the line "unsubscribe fio" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html