From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.ffmpeg.org (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTPS id DAF934B2B5 for ; Wed, 21 May 2025 12:09:37 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTP id 78A0068CF65; Wed, 21 May 2025 15:09:33 +0300 (EEST) Received: from mail-lf1-f44.google.com (mail-lf1-f44.google.com [209.85.167.44]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTPS id 41F1F68C98E for ; Wed, 21 May 2025 15:09:27 +0300 (EEST) Received: by mail-lf1-f44.google.com with SMTP id 2adb3069b0e04-5499614d3d2so8261554e87.3 for ; Wed, 21 May 2025 05:09:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=martin-st.20230601.gappssmtp.com; s=20230601; t=1747829366; x=1748434166; darn=ffmpeg.org; h=mime-version:references:message-id:in-reply-to:subject:to:from:date :from:to:cc:subject:date:message-id:reply-to; bh=l25S4r42n9kF27pAKITtNicYHm/XlTPIwpWSnbigxB8=; b=W13ArIZT3aWEnhLu9ACfrt7IUcg8BnG/NDbjV5rLHeoYhbyUM2ciXCufWkO1xIm0Ly KORPvhWUDliYdajvmvoj31YPKWRGwgCFXp1e2xwB63Lwrq614dxOghOMnHXcoWSRmsot SRt0XJTAGr6c5QR6LCPabnakDpw4FZM8QqCEIFmvzH4RH3fsoEa9yCa0lrqw1zRBvBl6 wBUgF4NFsTqOjoysEPfnnCVmJXE1XZikgcsTe6EJpjZFT6QITzOnbi73OKe4drqX7/iH jxrhmYkNA0qV8tENJwxI4lja9Cme/cDbOazL5RF+V35HXyBoXXTbP4faikr5ifEj0bry I2xw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1747829366; x=1748434166; h=mime-version:references:message-id:in-reply-to:subject:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=l25S4r42n9kF27pAKITtNicYHm/XlTPIwpWSnbigxB8=; b=LVBhRfz1ha37TXnru88WoNwIftmXQTaLQDFeazscksenYiWv82hmAh+d6EUa6yqO6u nHNqNMgxxnDU1lb5JKhXHakmy2srdCD70McfgPKDkEmudOZtFmlfY/STOD/IYJop7o2x NFURUNKj9U2J2FysbsLM+++yGC7KXsEuLBT/J47IQ2a14d4GVWdIJwjZ3XFW7gL3HeYp VgyG54gZaLsBEc+hGjA7DH0E98ViKRgQCLHiZ/6vfrUQ8ADDKtsH8J7pKIa63lIM66bv tYqZVyVP4iq+IQq1e5MBUftpwJ9k7PZHhRTpgJuOOmut6XgFM7N54t67En2wlrrgCWVA PBiA== X-Gm-Message-State: AOJu0Yz4MoNX0nHUhKDQgpPzQ0abGo57+6byR6cHJWairaBUB0yExlW3 Jrudp4UqjvrA2NBNXkE69fi0ZQIel87OMn73LMdWcv3Z6OOUtanvPZe3ebzE0exLOB9Pma8UhTX h2q2q5g== X-Gm-Gg: ASbGncvI3VmUj9amHr1cxNAeAkxAkX0ce3ykt3Qn+zUoErFg09ezz65dNHUDE+yyOzQ f3nTw9jdfW2ADpYykvReZMpO1oAMTXGhaoBF3cJidlBHrMIZwUdLdwuaTmaUmgfTz9eanVd7pYW CihJVPzhaZyzTC+OBUCNBGP2Fv8m0xmSRAExHiyOuxAwiM9Lgaou1gf+6SF0kvr6RaCol27QrWD jAcrb2Ul20LmWu4rX8g2F3v9htoJ1NLY2AQzE17NNGCdCkUUf5+/9ruTPuvkdh1EM2gcdoS9Acu ovMs5H9AHgPkG2QUa6KsK6ja+FozOOpf8u7KE03NZlzw9+EGFVKt857UZ0uZ/BeUQ5HS2EMSU83 Vde3BsZ2hNAEXUlPcEPfK29Q9ZhC8S0aN9FqtbU+uFMLtnSs= X-Google-Smtp-Source: AGHT+IGu7sNOAX7P2SrgGvfqTkXK46SJCofLyrAORwggjOl89pHww7H8Hu505CT4KBGswOGVyEWJnA== X-Received: by 2002:a05:6512:6805:b0:54f:ca1c:aea0 with SMTP id 2adb3069b0e04-550e71e345amr5875386e87.33.1747829365824; Wed, 21 May 2025 05:09:25 -0700 (PDT) Received: from tunnel335574-pt.tunnel.tserv24.sto1.ipv6.he.net (tunnel335574-pt.tunnel.tserv24.sto1.ipv6.he.net. [2001:470:27:11::2]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-550ed3e3b84sm2553342e87.192.2025.05.21.05.09.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 May 2025 05:09:25 -0700 (PDT) Date: Wed, 21 May 2025 15:09:22 +0300 (EEST) From: =?ISO-8859-15?Q?Martin_Storsj=F6?= To: FFmpeg development discussions and patches In-Reply-To: Message-ID: <403b95bb-e73d-9ca-293a-e18cfd813ab@martin.st> References: <20250521061750.54882-1-jiawei@iscas.ac.cn> MIME-Version: 1.0 Subject: Re: [FFmpeg-devel] gcc: Remove auto-vectorization limitation. X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: On Wed, 21 May 2025, Andreas Rheinhardt wrote: > Jiawei: >> This patch modifies the FFmpeg build system to remove the explicit disabling >> of GCC's auto-vectorization feature. >> >> Modern GCC versions (>= 10.0) have demonstrated stable auto-vectorization >> capabilities through extensive optimizations in loop analysis and SIMD >> code generation. The explicit -fno-tree-vectorize flag originally added >> in commit 973859f (2009) to workaround early GCC vectorization instability >> is no longer necessary. >> >> Key improvements justifying this change: >> 1. Enhanced heuristics for loop vectorization cost models >> 2. Mature handling of alignment and memory access patterns >> 3. Robust fallback mechanisms for unsupported architectures >> >> This change allows FFmpeg to benefit from automated SIMD optimizations >> when built with -O3 optimization level, particularly improving >> performance on x86_64 (AVX), ARM64 (SVE) and RISC-V(RVV) architectures. >> >> [1] https://git.ffmpeg.org/gitweb/ffmpeg.git/commit/973859f5230e77beea7bb59dc081870689d6d191 >> >> --- >> configure | 1 - >> 1 file changed, 1 deletion(-) >> >> diff --git a/configure b/configure >> index 3730b0524c..b9e95ce4ec 100755 >> --- a/configure >> +++ b/configure >> @@ -7656,7 +7656,6 @@ if enabled icc; then >> disable aligned_stack >> fi >> elif enabled gcc; then >> - check_optflags -fno-tree-vectorize >> check_cflags -Werror=format-security >> check_cflags -Werror=implicit-function-declaration >> check_cflags -Werror=missing-prototypes > > FYI: The last discussion about auto-vectorization is here: > https://ffmpeg.org/pipermail/ffmpeg-devel/2022-July/299405.html > It contains a report about a failing build with vectorization enabled: > https://ffmpeg.org/pipermail/ffmpeg-devel/2022-July/299421.html > I don't know whether this is still reproducible with the latest GCC. The issue which was reported last time, when compiling for i686 mingw32 with --cpu=haswell, seems to have gone away in 182663a58a7a099e02e76da3b0f96d63e5c26a6d, where we made the whole problematic x86 inline cabac assembly noinline on i386. (That whole inline assembly block has been problematic in a large number of cases anyway.) // Martin _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".