@@ -1096,6 +1096,8 @@ AC_CACHE_CHECK([for CC compiler name], [ac_cv_cc_name], [
10961096cat > conftest.c <<EOF
10971097#if defined(__EMSCRIPTEN__)
10981098 emcc
1099+ #elif defined(__INTEL_CLANG_COMPILER) || defined(__INTEL_LLVM_COMPILER)
1100+ icx
10991101#elif defined(__INTEL_COMPILER) || defined(__ICC)
11001102 icc
11011103#elif defined(__ibmxl__) || defined(__xlc__) || defined(__xlC__)
@@ -1145,8 +1147,9 @@ then
11451147 case "$ac_cv_cc_name" in
11461148 gcc) AC_PATH_TOOL ( [ CXX] , [ g++] , [ notfound] ) ;;
11471149 cc) AC_PATH_TOOL ( [ CXX] , [ c++] , [ notfound] ) ;;
1148- clang) AC_PATH_TOOL ( [ CXX] , [ clang++] , [ notfound] ) ;;
1149- icc) AC_PATH_TOOL ( [ CXX] , [ icpc] , [ notfound] ) ;;
1150+ clang) AC_PATH_TOOL ( [ CXX] , [ clang++] , [ notfound] ) ;;
1151+ icx) AC_PATH_TOOL ( [ CXX] , [ icpx] , [ notfound] ) ;;
1152+ icc) AC_PATH_TOOL ( [ CXX] , [ icpc] , [ notfound] ) ;;
11501153 esac
11511154 if test "$CXX" = "notfound"
11521155 then
20912094LLVM_PROF_ERR=no
20922095
20932096case "$ac_cv_cc_name" in
2094- clang)
2097+ clang|icx )
20952098 # Any changes made here should be reflected in the GCC+Darwin case below
20962099 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
20972100 PGO_PROF_USE_FLAG="-fprofile-instr-use=\"\$(shell pwd)/code.profclangd\""
@@ -2969,6 +2972,10 @@ case "$ac_cv_cc_name" in
29692972mpicc)
29702973 CFLAGS_NODIST="$CFLAGS_NODIST"
29712974 ;;
2975+ icx)
2976+ # ICX needs fp-model=precise (the default in clang) or floats behave badly
2977+ CFLAGS_NODIST="$CFLAGS_NODIST -ffp-model=precise"
2978+ ;;
29722979icc)
29732980 # ICC needs -fp-model strict or floats behave badly
29742981 CFLAGS_NODIST="$CFLAGS_NODIST -fp-model strict"
@@ -6345,8 +6352,8 @@ AX_C_FLOAT_WORDS_BIGENDIAN(
63456352# rounding precision of 64 bits. For gcc/x86, we can fix this by
63466353# using inline assembler to get and set the x87 FPU control word.
63476354
6348- # This inline assembler syntax may also work for suncc and icc,
6349- # so we try it on all platforms.
6355+ # This inline assembler syntax works for icx and may also work for
6356+ # suncc and icc, so we try it on all platforms.
63506357
63516358AC_CACHE_CHECK ( [ whether we can use gcc inline assembler to get and set x87 control word] , [ ac_cv_gcc_asm_for_x87] , [
63526359AC_LINK_IFELSE ( [ AC_LANG_PROGRAM ( [ [ ] ] , [ [
0 commit comments