You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-10 06:10:52 +02:00
configure: don't disable '-ftree-vectorize' on GCC >= 13 on major architectures
This changes configure to stop disabling -ftree-vectorize on GCC versions 13 and newer, on major architectures. Background: - Original `-fno-tree-vectorize` was added in 2009 in commit973859f523
to avoid compiler errors. - Re-enabled in 2016 in commitcb8646af24
but caused failures due to inline CABAC assembly issues and was disabled again infd6dbc5385
. - Commit182663a58a
in 2023 fixed the inline CABAC assembly issues. - Recent versions of GCC, in particular 13 and newer, seem to generally work reliably with respect to vectorization, although bugs have been observed on Loongarch. Cautiously allow the GCC default of having vectorization enabled, on major architectures where we expect to see enough testing. If further issues are observed, they should be reported and noted here in configure, so the workarounds can be scoped and version limited.
This commit is contained in:
@@ -26,6 +26,7 @@ version <next>:
|
||||
- OpenHarmony hardware decoder/encoder
|
||||
- Colordetect filter
|
||||
- Add vf_scale_d3d11 filter
|
||||
- No longer disabling GCC autovectorization, on X86, ARM and AArch64
|
||||
|
||||
|
||||
version 7.1:
|
||||
|
20
configure
vendored
20
configure
vendored
@@ -7729,7 +7729,25 @@ if enabled icc; then
|
||||
disable aligned_stack
|
||||
fi
|
||||
elif enabled gcc; then
|
||||
check_optflags -fno-tree-vectorize
|
||||
gcc_version=$($cc -dumpversion)
|
||||
major_version=${gcc_version%%.*}
|
||||
if [ $major_version -lt 13 ]; then
|
||||
# Disable tree-vectorize for GCC <13 - it has historically been buggy.
|
||||
check_optflags -fno-tree-vectorize
|
||||
else
|
||||
case $arch in
|
||||
x86|arm|aarch64)
|
||||
# Allow the default of having tree-vectorize enabled on well tested
|
||||
# architectures.
|
||||
;;
|
||||
*)
|
||||
# Disable tree-vectorize on potentially less tested
|
||||
# architectures. Known issues:
|
||||
# - https://gcc.gnu.org/PR121064 on Loongarch
|
||||
check_optflags -fno-tree-vectorize
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
check_cflags -Werror=format-security
|
||||
check_cflags -Werror=implicit-function-declaration
|
||||
check_cflags -Werror=missing-prototypes
|
||||
|
Reference in New Issue
Block a user