From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 55A69385DC2E; Mon, 13 Jul 2020 08:05:32 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 55A69385DC2E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1594627532; bh=Hq3MQVpckQORQBhQFRcHe81YcnyjWl5wM/hK+LFurWs=; h=From:To:Subject:Date:In-Reply-To:References:From; b=YL7CbtLTQWNsrHzNAQGPwC+ZdqJyWoNt7AsihvQ93o3/n9FRMSev1DEb+D+6sk7DQ WyE0aRyC9C29U5TW3Guh7spjvnX1OswSQ+FSSXyPPdYgQOeKkEqOKe+F6HgfHdzylU xe/8BIk5fzy79IpObXLKqTTi/Lp6PfujRKkPwZ/s= From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/96166] [10/11 Regression] -O3/-ftree-slp-vectorize turns ROL into a mess Date: Mon, 13 Jul 2020 08:05:32 +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: 10.0 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 10.2 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: target_milestone blocked keywords everconfirmed bug_status cf_reconfirmed_on 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: Mon, 13 Jul 2020 08:05:32 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D96166 Richard Biener changed: What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|--- |10.2 Blocks| |53947 Keywords| |missed-optimization Ever confirmed|0 |1 Status|UNCONFIRMED |NEW Last reconfirmed| |2020-07-13 --- Comment #1 from Richard Biener --- Confirmed. 0x3c02500 _10 1 times vector_store costs 12 in body 0x3c02500 1 times vec_construct costs 8 in prologue 0x3a3e900 _10 1 times scalar_store costs 12 in body 0x3a3e900 _9 1 times scalar_store costs 12 in body t.i:14:1: note: Cost model analysis: Vector inside of basic block cost: 12 Vector prologue cost: 8 Vector epilogue cost: 0 Scalar cost of basic block: 24 t.i:14:1: note: Basic block will be vectorized using SLP and we end up with [local count: 1073741824]: _3 =3D MEM [(char * {ref-all})x_2(D)]; _9 =3D (int) _3; _10 =3D BIT_FIELD_REF <_3, 32, 32>; _11 =3D {_10, _9}; _7 =3D VIEW_CONVERT_EXPR(_11); MEM [(char * {ref-all})x_2(D)] =3D _7; the IL we feed into the vectorizer and the earlier bswap pass is _3 =3D MEM [(char * {ref-all})x_2(D)]; _9 =3D (int) _3; _10 =3D BIT_FIELD_REF <_3, 32, 32>; y =3D _10; MEM[(int &)&y + 4] =3D _9; _4 =3D MEM [(char * {ref-all})&y]; MEM [(char * {ref-all})x_2(D)] =3D _4; I guess fixing the vectorizer to handle the "grouped load" would eventually allow fixing this. I don't think there's anything to do from the costing side... Referenced Bugs: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D53947 [Bug 53947] [meta-bug] vectorizer missed-optimizations=