Commit 7b49785356 for ffmpeg
commit 7b4978535672980f22db76bac2bd304ecb659640
Author: Kacper Michajłow <kasper93@gmail.com>
Date: Sun Oct 18 20:10:45 2026 +0200
configure: allow GCC tree-vectorize on ppc, riscv, mips and loongarch
Forgejo CI runs FATE on ppc64, mips64 and riscv64 with GCC 16 under
QEMU, and FATE has native ppc64le (GCC 15) and riscv64 (GCC 14) clients,
so these architectures get the same coverage as x86, arm and aarch64.
On loongarch GCC 14.0-14.3 and 15.0-15.1 miscompile vector permutations
(GCC PR121064), fixed in 14.4, 15.2 and newer, so vectorization is
disabled only for those versions.
Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
diff --git a/Changelog b/Changelog
index 32ecd6374e..6bb1201481 100644
--- a/Changelog
+++ b/Changelog
@@ -28,6 +28,7 @@ version 9.1:
- D3D12 DirectML zero-copy inference for the ONNX Runtime DNN backend
- side_data bitstream filter
- JPEG Multi-Picture Format demuxer
+- No longer disabling GCC autovectorization on PowerPC, RISC-V, MIPS and LoongArch
version 9.0:
diff --git a/configure b/configure
index 2fb600fbea..4f920a4f55 100755
--- a/configure
+++ b/configure
@@ -8011,21 +8011,30 @@ if enabled icc; then
disable aligned_stack
fi
elif enabled gcc; then
- gcc_version=$($cc -dumpversion)
+ gcc_version=$($cc -dumpfullversion -dumpversion)
major_version=${gcc_version%%[!0-9]*}
+ minor_version=${gcc_version#$major_version}
+ minor_version=${minor_version#.}
+ minor_version=${minor_version%%[!0-9]*}
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.
+ x86|arm|aarch64|ppc|riscv|mips)
+ # Allow the default of having tree-vectorize enabled on
+ # architectures covered by CI and FATE.
+ ;;
+ loongarch)
+ # GCC 14.0-14.3 and 15.0-15.1 miscompile vector permutations,
+ # see https://gcc.gnu.org/PR121064. Fixed in 14.4, 15.2 and newer.
+ case $major_version.${minor_version:-0} in
+ 14.[0-3]|15.[01]) check_optflags -fno-tree-vectorize ;;
+ esac
;;
*)
# Disable tree-vectorize on potentially less tested
- # architectures. Known issues:
- # - https://gcc.gnu.org/PR121064 on Loongarch
+ # architectures.
check_optflags -fno-tree-vectorize
;;
esac