Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
SWIFT
SWIFTsim
Commits
c2f7718b
Commit
c2f7718b
authored
Oct 18, 2019
by
Matthieu Schaller
Browse files
Only set the AVX512 flags with GCC when compiling with a version that supports the flag.
parent
c872e9dd
Changes
1
Hide whitespace changes
Inline
Side-by-side
configure.ac
View file @
c2f7718b
...
...
@@ -71,6 +71,13 @@ AC_USE_SYSTEM_EXTENSIONS
AX_COMPILER_VENDOR
AX_COMPILER_VERSION
# Check whether we have a recent enough GCC
if test "$ax_cv_c_compiler_vendor" = "gnu"; then
AX_COMPARE_VERSION([$ax_cv_c_compiler_version], [ge], [8.1.0],
[gcc_handles_avx512="yes"],
[gcc_handles_avx512="no"])
fi
# Restrict support.
AC_C_RESTRICT
...
...
@@ -462,14 +469,18 @@ if test "$enable_opt" = "yes" ; then
;;
esac
elif test "$ax_cv_c_compiler_vendor" = "gnu"; then
case "$ax_gcc_arch" in
*skylake-avx512*)
GRAVITY_CFLAGS="$GRAVITY_CFLAGS -mprefer-vector-width=512"
;;
*)
AC_MSG_WARN([No additional flags needed for gravity on this platform])
;;
esac
if test "$gcc_handles_avx512" = "yes"; then
case "$ax_gcc_arch" in
*skylake-avx512*)
[GRAVITY_CFLAGS="$GRAVITY_CFLAGS -mprefer-vector-width=512"],
;;
*)
AC_MSG_WARN([No additional flags needed for gravity on this platform])
;;
esac
else
AC_MSG_WARN([No additional flags needed for gravity on this platform])
fi
else
AC_MSG_WARN([Do not know what best gravity vectorization flags to choose for this compiler])
fi
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment