From patchwork Thu Oct 31 14:18:46 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Biener X-Patchwork-Id: 2004685 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=law1DFiE; dkim=pass header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=ilB9VKUZ; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=law1DFiE; dkim=neutral header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=ilB9VKUZ; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=8.43.85.97; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4XfR321XJfz1xxp for ; Fri, 1 Nov 2024 01:19:58 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 42FE7385773F for ; Thu, 31 Oct 2024 14:19:56 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) by sourceware.org (Postfix) with ESMTPS id 351573857724 for ; Thu, 31 Oct 2024 14:18:47 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 351573857724 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=suse.de ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 351573857724 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=195.135.223.130 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1730384330; cv=none; b=aYJHEVKstOxFwLcD0bYZgnc2A+pswHNahHwQfNwOm1LyWPSnw58PPpXnvhXfA8/0BnejFR/62VFCj9AX3mtjvfhr1BBjM+zuEduuuz52y3Q2H43dC0IeugqkgltXCBdG3lYmGcbI4UQoHVvZoTEdCILc/1PSzj1LrPImenJ4cqs= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1730384330; c=relaxed/simple; bh=6NO+ki6JVMvq7i4YqIIpjElILHDJBhe6WrCcT7IfY9Q=; h=DKIM-Signature:DKIM-Signature:DKIM-Signature:DKIM-Signature:Date: From:To:Subject:MIME-Version; b=lWjTNERWYNckto0EmlzHBHobHVeLl4IkUzH5UjNr+lxCpQhCbAsTeqJK73xlUu0LMgVR74dGkhOfKa50AczUi/tS/WhKpKHfREWF5tuGsrnxPuF9dZvLJv++FN6FzFcVAW4RT/Eme0S/SPaObpULxEJtSE0PWT5tcrYsn+E9HSw= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from murzim.nue2.suse.org (unknown [10.168.4.243]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 56D5921F09 for ; Thu, 31 Oct 2024 14:18:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1730384326; h=from:from:reply-to:date:date:to:to:cc:mime-version:mime-version: content-type:content-type; bh=OG+2IO5P/DJBsMVojzEU8eml6+c6mwlA3bwd1ZUpXt4=; b=law1DFiENIVXfA3gaK9Lwz+fbSWadPOfjRgPs0D7dwU0W9bJPB/yvxBCEpE0oiAaO5kioQ FIh/GBkZCIqIvD2ZXQ9Z9LNmftZkSPgyqN1089HonBKEH/tfDpHMPvNXu0fItivOlTVWXm JoKq8/GevAMzcQYzLDQ4NXCH0XgtMGI= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1730384326; h=from:from:reply-to:date:date:to:to:cc:mime-version:mime-version: content-type:content-type; bh=OG+2IO5P/DJBsMVojzEU8eml6+c6mwlA3bwd1ZUpXt4=; b=ilB9VKUZkh+J9dCPO8lnvknVFgJ/pBAPW0D45fCSwNmgWhJi+yOrM2pZZDWk4jvldB5LQT bCf1oAbJs+S+fICw== Authentication-Results: smtp-out1.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1730384326; h=from:from:reply-to:date:date:to:to:cc:mime-version:mime-version: content-type:content-type; bh=OG+2IO5P/DJBsMVojzEU8eml6+c6mwlA3bwd1ZUpXt4=; b=law1DFiENIVXfA3gaK9Lwz+fbSWadPOfjRgPs0D7dwU0W9bJPB/yvxBCEpE0oiAaO5kioQ FIh/GBkZCIqIvD2ZXQ9Z9LNmftZkSPgyqN1089HonBKEH/tfDpHMPvNXu0fItivOlTVWXm JoKq8/GevAMzcQYzLDQ4NXCH0XgtMGI= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1730384326; h=from:from:reply-to:date:date:to:to:cc:mime-version:mime-version: content-type:content-type; bh=OG+2IO5P/DJBsMVojzEU8eml6+c6mwlA3bwd1ZUpXt4=; b=ilB9VKUZkh+J9dCPO8lnvknVFgJ/pBAPW0D45fCSwNmgWhJi+yOrM2pZZDWk4jvldB5LQT bCf1oAbJs+S+fICw== Date: Thu, 31 Oct 2024 15:18:46 +0100 (CET) From: Richard Biener To: gcc-patches@gcc.gnu.org Subject: [PATCH 2/2] Move vect_update_inits_of_drs MIME-Version: 1.0 X-Spamd-Result: default: False [-1.11 / 50.00]; BAYES_HAM(-3.00)[99.99%]; MISSING_MID(2.50)[]; NEURAL_HAM_LONG(-0.32)[-0.325]; NEURAL_HAM_SHORT(-0.18)[-0.911]; MIME_GOOD(-0.10)[text/plain]; MISSING_XM_UA(0.00)[]; MIME_TRACE(0.00)[0:+]; ARC_NA(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; RCVD_COUNT_ZERO(0.00)[0]; FROM_HAS_DN(0.00)[]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; TO_DN_NONE(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[tree-vect-loop.cc:url] X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org Message-Id: <20241031141956.42FE7385773F@sourceware.org> Move vect_update_inits_of_drs to after setting up the epilog metadata. Bootstrapped and tested on x86_64-unknown-linux-gnu. * tree-vect-loop.cc (update_epilogue_loop_vinfo): Update DR inits after adjusting the epilog metadata. --- gcc/tree-vect-loop.cc | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/gcc/tree-vect-loop.cc b/gcc/tree-vect-loop.cc index b008bd539f8..4afa7493271 100644 --- a/gcc/tree-vect-loop.cc +++ b/gcc/tree-vect-loop.cc @@ -12165,11 +12165,6 @@ update_epilogue_loop_vinfo (class loop *epilogue, tree advance) LOOP_VINFO_BBS (epilogue_vinfo) = epilogue_bbs; LOOP_VINFO_NBBS (epilogue_vinfo) = epilogue->num_nodes; - /* Advance data_reference's with the number of iterations of the previous - loop and its prologue. */ - vect_update_inits_of_drs (epilogue_vinfo, advance, PLUS_EXPR); - - /* The EPILOGUE loop is a copy of the original loop so they share the same gimple UIDs. In this loop we update the loop_vec_info of the EPILOGUE to point to the copied statements. We also create a mapping of all LHS' in @@ -12292,6 +12287,10 @@ update_epilogue_loop_vinfo (class loop *epilogue, tree advance) DR_STMT (dr) = STMT_VINFO_STMT (stmt_vinfo); } + /* Advance data_reference's with the number of iterations of the previous + loop and its prologue. */ + vect_update_inits_of_drs (epilogue_vinfo, advance, PLUS_EXPR); + epilogue_vinfo->shared->datarefs_copy.release (); epilogue_vinfo->shared->save_datarefs (); }