From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id BF7E2386F023; Thu, 27 Aug 2020 06:40:57 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BF7E2386F023 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1598510457; bh=sukruiHJDK4ZuV/nYqozUjMgH0Q9OvLcbq3W9dpebC4=; h=From:To:Subject:Date:In-Reply-To:References:From; b=fJuuSfV7QrhZIP9yZ3/u6/ZvKzIiq9dUNqjLRfWEinEUKd1MBnuD62q0gjwbisLND Y64/wFSgo/wR3KdpcpBezxk3pWn0qynCXtWguN8ndOC/xv/uDEQ0KXlqT2zf9xHw75 HkLnyV4OqDNPQxCwJa5ucWytoNbOx9JeoZJiK0i8= From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/96789] x264: sub4x4_dct() improves when vectorization is disabled Date: Thu, 27 Aug 2020 06:40:57 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 11.0 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Aug 2020 06:40:57 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D96789 --- Comment #4 from Richard Biener --- This delays some checks to eventually support part of the BB vectorization which is what succeeds here. I suspect that w/o vectorization we manage to elide the tmp[] array but with the part vectorization that occurs we fail to do that. On the cost side there would be a lot needed to make the vectorization not profitable: Vector inside of basic block cost: 8 Vector prologue cost: 36 Vector epilogue cost: 0 Scalar cost of basic block: 64 the thing to double-check is 0x123b1ff0 1 times vec_construct costs 17 in prologue that is the cost of the V16QI construct _813 =3D {_437, _448, _459, _470, _490, _501, _512, _523, _543, _554, _565, _576, _125, _143, _161, _179};=20 maybe you can extract a testcase for the function as well?=