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 C5A933858C53 for ; Fri, 25 Aug 2023 08:14:11 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org C5A933858C53 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 imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id DCC9821850 for ; Fri, 25 Aug 2023 08:14:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1692951248; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version:content-type:content-type; bh=QmqvaoBC0GbVWNR4ODUdYzNUF/S8us8ZG+MkKxjUXsY=; b=QNUzM2YC9byEoD2sRAo+qgT4XW2eQWUYLjeNJaI/22Gm3ssK4we18yQHulFWHJp8doZZGc xKoGFDnKdZ89rOR2/GoNceNzjdw7G1DVrwq0yyHf6Vkg6nqylXhH6B6RQubWV8cwfYRuDS VvhgkLV5W9rbb8H7XpuYh96/7mOdmiY= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1692951248; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version:content-type:content-type; bh=QmqvaoBC0GbVWNR4ODUdYzNUF/S8us8ZG+MkKxjUXsY=; b=UDcgV+w7D/9SwYAW/pTwwZEjxo5biwo+U7PRkw/OhB0txqH1+I4TZAI6+JkUSIGx1WEujY kZjLYwlZnF1Ta/DA== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id C9C121340A for ; Fri, 25 Aug 2023 08:14:08 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id 2k8TMNBi6GQwXgAAMHmgww (envelope-from ) for ; Fri, 25 Aug 2023 08:14:08 +0000 Date: Fri, 25 Aug 2023 10:14:08 +0200 (CEST) From: Richard Biener To: gcc-patches@gcc.gnu.org Subject: [PATCH] tree-optimization/111136 - STMT_VINFO_SLP_VECT_ONLY and stores MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Message-Id: <20230825081408.C9C121340A@imap2.suse-dmz.suse.de> X-Spam-Status: No, score=-11.2 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,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: vect_dissolve_slp_only_groups currently only expects loads, for stores we have to make sure to mark the dissolved "groups" strided. Bootstrapped on x86_64-unknown-linux-gnu, testing in progress. PR tree-optimization/111136 * tree-vect-loop.cc (vect_dissolve_slp_only_groups): For stores force STMT_VINFO_STRIDED_P and also duplicate that to all elements. --- gcc/tree-vect-loop.cc | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/gcc/tree-vect-loop.cc b/gcc/tree-vect-loop.cc index ebee8037e02..23c6e8259e7 100644 --- a/gcc/tree-vect-loop.cc +++ b/gcc/tree-vect-loop.cc @@ -2453,8 +2453,13 @@ vect_dissolve_slp_only_groups (loop_vec_info loop_vinfo) DR_GROUP_FIRST_ELEMENT (vinfo) = vinfo; DR_GROUP_NEXT_ELEMENT (vinfo) = NULL; DR_GROUP_SIZE (vinfo) = 1; - if (STMT_VINFO_STRIDED_P (first_element)) - DR_GROUP_GAP (vinfo) = 0; + if (STMT_VINFO_STRIDED_P (first_element) + /* We cannot handle stores with gaps. */ + || DR_IS_WRITE (dr_info->dr)) + { + STMT_VINFO_STRIDED_P (vinfo) = true; + DR_GROUP_GAP (vinfo) = 0; + } else DR_GROUP_GAP (vinfo) = group_size - 1; /* Duplicate and adjust alignment info, it needs to -- 2.35.3