From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp-out1.suse.de (smtp-out1.suse.de [IPv6:2001:67c:2178:6::1c]) by sourceware.org (Postfix) with ESMTPS id AFED6385840B for ; Mon, 7 Nov 2022 11:05:51 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org AFED6385840B Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=suse.de Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out1.suse.de (Postfix) with ESMTP id ECF2521CE4; Mon, 7 Nov 2022 11:05:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1667819150; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=Bfs1DCWycDw1pJlyA2OwR6ywLzTg5qA2CkpmS4hiygY=; b=pegoL2f/E067lejTdvqwBVlEtuC8MFYHm91GkLw485a6m75QQLwiQv1XVq/MXNX66+krdw 4hI6Ph4U1ox8S/WiDtTyGvr0KRvqLDi/oOC3A7Hnz0kvT+QYpg6rZcGxDSNFpIlEali6nl PxPVc2uZmo28Zu0gPZ94MyBTapC+2Hs= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1667819150; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=Bfs1DCWycDw1pJlyA2OwR6ywLzTg5qA2CkpmS4hiygY=; b=I1DgKveqfQCTPBLob4mlxCXxDM60TUjun85jJfxgTbh4yzIjF+cpgezWdQD0FlTBp1QlBf Hb4cd/Crznw/YRDA== 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 E634F2C141; Mon, 7 Nov 2022 11:05:50 +0000 (UTC) Date: Mon, 7 Nov 2022 11:05:50 +0000 (UTC) From: Richard Biener To: "Andre Vieira (lists)" cc: "gcc-patches@gcc.gnu.org" , Richard Sandiford Subject: Re: [PATCH] ifcvt: Support bitfield lowering of multiple-exit loops In-Reply-To: <785436fa-0ef9-e424-030d-f7b2bdf9c935@arm.com> Message-ID: References: <785436fa-0ef9-e424-030d-f7b2bdf9c935@arm.com> User-Agent: Alpine 2.22 (LSU 394 2020-01-19) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="-1609957120-859926901-1667819150=:4294" X-Spam-Status: No, score=-3.5 required=5.0 tests=BAYES_00,BODY_8BITS,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,KAM_SHORT,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 List-Id: This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. ---1609957120-859926901-1667819150=:4294 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT On Thu, 3 Nov 2022, Andre Vieira (lists) wrote: > Hi, > > With Tamar's patch > (https://gcc.gnu.org/pipermail/gcc-patches/2022-November/604880.html) enabling > the vectorization of early-breaks, I'd like to allow bitfield lowering in such > loops, which requires the relaxation of allowing multiple exits when doing > so.  In order to avoid a similar issue to PR107275, I hoisted the code that > rejects loops with certain types of gimple_stmts from > 'if_convertible_loop_p_1' to 'get_loop_body_in_if_conv_order', to avoid trying > to lower bitfields in loops we are not going to vectorize anyway.  This also > ensures 'ifcvt_local_dce' doesn't accidentally remove statements it shouldn't > as it will never come across them.  I made sure to add a comment to make clear > that there is a direct connection between the two and if we were to enable > vectorization of any other gimple statement we should make sure both handle > it. > > Bootstrapped and regression tested on aarch64-none-linux-gnu and > x86_64-pc-linux-gnu OK. Thanks, Richard. > gcc/ChangeLog: > >         * tree-if-conv.cc (if_convertible_loop_p_1): Move statement check loop > from here ... >         (get_loop_body_if_conv_order): ... to here. >         (if_convertible_loop_p): Remove single_exit check. >         (tree_if_conversion): Move single_exit check to if-conversion part. > > gcc/testsuite/ChangeLog: > >         * gcc.dg/vect/vect-bitfield-read-1-not.c: New test. >         * gcc.dg/vect/vect-bitfield-read-2-not.c: New test. >         * gcc.dg/vect/vect-bitfield-read-8.c: New test. >         * gcc.dg/vect/vect-bitfield-read-9.c: New test. > > -- Richard Biener SUSE Software Solutions Germany GmbH, Frankenstrasse 146, 90461 Nuernberg, Germany; GF: Ivo Totev, Andrew Myers, Andrew McDonald, Boudien Moerman; HRB 36809 (AG Nuernberg) ---1609957120-859926901-1667819150=:4294--