From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by sourceware.org (Postfix) with ESMTPS id 70FDB3858424 for ; Fri, 29 Jul 2022 10:52:14 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 70FDB3858424 Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out2.suse.de (Postfix) with ESMTP id 3FF9A20AED; Fri, 29 Jul 2022 10:52:12 +0000 (UTC) Received: from wotan.suse.de (wotan.suse.de [10.160.0.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by relay2.suse.de (Postfix) with ESMTPS id 041552C141; Fri, 29 Jul 2022 10:52:12 +0000 (UTC) Date: Fri, 29 Jul 2022 10:52:11 +0000 (UTC) From: Richard Biener To: Jakub Jelinek cc: "Andre Vieira (lists)" , Richard Sandiford , "gcc-patches@gcc.gnu.org" Subject: Re: [RFC] Teach vectorizer to deal with bitfield reads In-Reply-To: Message-ID: References: <4a6f2350-f070-1473-63a5-3232968d3a89@arm.com> <4ea91767-de43-9d30-5bd2-a9a0759760c7@arm.com> User-Agent: Alpine 2.22 (LSU 394 2020-01-19) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Spam-Status: No, score=-5.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Jul 2022 10:52:17 -0000 On Fri, 29 Jul 2022, Jakub Jelinek wrote: > On Fri, Jul 29, 2022 at 09:57:29AM +0100, Andre Vieira (lists) via Gcc-patches wrote: > > The 'only on the vectorized code path' remains the same though as vect_recog > > also only happens on the vectorized code path right? > > if conversion (in some cases) duplicates a loop and guards one copy with > an ifn which resolves to true if that particular loop is vectorized and > false otherwise. So, then changes that shouldn't be done in case of > vectorization failure can be done on the for vectorizer only copy of the > loop. And just to mention, one issue with lowering of bitfield accesses is bitfield inserts which, on some architectures (hello m68k) have instructions operating on memory directly. For those it's difficult to not regress in code quality if a bitfield store becomes a read-modify-write cycle. That's one of the things holding this back. One idea would be to lower to .INSV directly for those targets (but presence of insv isn't necessarily indicating support for memory destinations). Richard.