From patchwork Wed Nov 8 15:36:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Biener X-Patchwork-Id: 163088 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:aa0b:0:b0:403:3b70:6f57 with SMTP id k11csp994678vqo; Wed, 8 Nov 2023 07:37:11 -0800 (PST) X-Google-Smtp-Source: AGHT+IFKivDt5ADTweoP4AfjLYNGhC4qhAYpdKZac1uoHJanU/oD5UfempoVaGaRMNFcRHXrgEHX X-Received: by 2002:a05:6830:1014:b0:6d3:28c1:bd46 with SMTP id a20-20020a056830101400b006d328c1bd46mr2570330otp.10.1699457831056; Wed, 08 Nov 2023 07:37:11 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1699457831; cv=pass; d=google.com; s=arc-20160816; b=LUfPXPMoNmaL8QUhXChkubjcXKRmD303V18nEx53eroJPBp4Rm3m1BotpWyoq6lGbw GTLwQKstu9tfG8Z4w2Fah++dHD+vzGYoprMxqMIFrCozXv4lSCKo9e5wV1rRT5wwUY/F OWUxY2ZAObUyDILljoCJrxCVmUKbmutmP8L/aMCvEeIq+NHVzPjztkH2gexUd+zN5/ab 7wjg6147TRSsbJ7f86RPRL/ysIRBIuL8AcjbbHejhw1XCmvAppOvJV/eNAGKohgcEtOp myfRIPf/kQ0AvWD2jYjq8B9eCFrpQAVzQWMh22zoXwLBSp+U0fvXQx2Ui3uu2K9JLL04 TIXg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:message-id:mime-version:subject :to:from:date:dkim-signature:dkim-signature:arc-filter:dmarc-filter :delivered-to; bh=LWUoY6ROdpdtsoZrXKU1/BEsyFuK6ZoT49vMMgC0XxI=; fh=hPrbWPhweUx4V0GV9uXJqbyAzg2ABmTz7kczrAQqMmM=; b=rL4vyDoznlRiYNeV3ocPZPXUCYoZQk36Vpkfj7FIRIDGG/0Kq+7FJcVzdoyabmnU+i JYdXnOfoI6BHNS0WIuBKJz5S+B9xyqSnAaZ/KEopaxV23PdYvoLRT8yCwc+gzMD1l6LK VZq3ye1/9e0uWoU+WPGE1rthsW/ofGznbiQy+vhYnnystuiiDgvpWVMsLpEDyogSx42H mkn8/bThzxj6kZYbonDC9CfVwaLmeyqoE2oVA5HLaGECZga0WerKQOFRDkApc9m4Nshs 86s77wVG4FOyBwYvDrvKP2/BZq4LTLCH8vL4TtyCeBbVFGwmNxvJGHZIfNqqd5mJGomk 1dAA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=oforzFjV; dkim=neutral (no key) header.i=@suse.de; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Received: from server2.sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id a15-20020a05622a02cf00b0041e5d30e0casi1442176qtx.283.2023.11.08.07.37.10 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Nov 2023 07:37:11 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=oforzFjV; dkim=neutral (no key) header.i=@suse.de; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id CDBB838582A1 for ; Wed, 8 Nov 2023 15:37:10 +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.220.28]) by sourceware.org (Postfix) with ESMTPS id 4D3853858C74 for ; Wed, 8 Nov 2023 15:36:47 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 4D3853858C74 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 4D3853858C74 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=195.135.220.28 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1699457808; cv=none; b=coEJnYBgY+GmdpEIsXxqHiKrxkWsNUBuA/NoXh+XwgJiKHYn2Ocljsun1WRZbbt52j/f0qR6fKHAd8k6sWDUN9EyceDPH9xsX4yqq1ATyA8B3+IlMujpocDksivWzrb1zU1fXpxXrF9Utv25mBNoqE1JaH+Qq0HpyCdmI6s8OQk= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1699457808; c=relaxed/simple; bh=NyYRtFROKs1X9UGYrdlVnN7xpZK3HpXL1hjEn2P4ARw=; h=DKIM-Signature:DKIM-Signature:Date:From:To:Subject:MIME-Version: Message-Id; b=WKLj8cV0eDRmvz4AILr0D61+693FcHJyjlOLj5Y5puBVwCy8Vy1QfrsK5/eFiipICsh09uxMCz0tSBbdfx9U5jX93+sCHhyrKH4v2N6yuh51KQtetgJTcvkQdmZs25SoljBpqKpVNuAGJv4e9v6XA3KIDkbYmHK5471kF7rRWkU= ARC-Authentication-Results: i=1; server2.sourceware.org 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 65B7521921 for ; Wed, 8 Nov 2023 15:36:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1699457806; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version:content-type:content-type; bh=LWUoY6ROdpdtsoZrXKU1/BEsyFuK6ZoT49vMMgC0XxI=; b=oforzFjVTt82XIKRbkV/sgaPpTSiIm5lCB/Kma4jWDLc2BLWVfAvcg1U/oPx15rkpFNEBh +gLED6R0ZwzjXdl7V5FNkmE3Dmngp2MSxf7/UOB9SGONL+n1nErSxMGSeJyPKZpQbN0v2Z JH6+mtSKrEM/8Ulkry2mKoK9ABn+oSQ= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1699457806; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version:content-type:content-type; bh=LWUoY6ROdpdtsoZrXKU1/BEsyFuK6ZoT49vMMgC0XxI=; b=sBWalm/wVrvVN6rFaUpHLidJri7YLXV5aqCuSfbZ0UmwiBDUditdRhSd5IYuNrnoYVcVII nWLIplp3ZP9KUOCQ== 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 5100A138F2 for ; Wed, 8 Nov 2023 15:36:46 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id 6c+OEg6rS2V1CQAAMHmgww (envelope-from ) for ; Wed, 08 Nov 2023 15:36:46 +0000 Date: Wed, 8 Nov 2023 16:36:45 +0100 (CET) From: Richard Biener To: gcc-patches@gcc.gnu.org Subject: [PATCH] Fix SIMD clone SLP a bit more MIME-Version: 1.0 Message-Id: <20231108153646.5100A138F2@imap2.suse-dmz.suse.de> X-Spam-Status: No, score=-11.5 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, T_SCC_BODY_TEXT_LINE 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.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1782010694725594122 X-GMAIL-MSGID: 1782010694725594122 The following fixes an omission, mangling the non-SLP and SLP simd-clone info. Bootstrap and regtest running on x86_64-unknown-linux-gnu. * tree-vect-stmts.cc (vectorizable_simd_clone_call): Record to the correct simd_clone_info. --- gcc/tree-vect-stmts.cc | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/gcc/tree-vect-stmts.cc b/gcc/tree-vect-stmts.cc index b4c2ae31c92..ee89f47c468 100644 --- a/gcc/tree-vect-stmts.cc +++ b/gcc/tree-vect-stmts.cc @@ -4237,16 +4237,15 @@ vectorizable_simd_clone_call (vec_info *vinfo, stmt_vec_info stmt_info, case SIMD_CLONE_ARG_TYPE_LINEAR_CONSTANT_STEP: case SIMD_CLONE_ARG_TYPE_LINEAR_REF_CONSTANT_STEP: { - auto &clone_info = STMT_VINFO_SIMD_CLONE_INFO (stmt_info); - clone_info.safe_grow_cleared (i * 3 + 1, true); - clone_info.safe_push (arginfo[i].op); + simd_clone_info.safe_grow_cleared (i * 3 + 1, true); + simd_clone_info.safe_push (arginfo[i].op); tree lst = POINTER_TYPE_P (TREE_TYPE (arginfo[i].op)) ? size_type_node : TREE_TYPE (arginfo[i].op); tree ls = build_int_cst (lst, arginfo[i].linear_step); - clone_info.safe_push (ls); + simd_clone_info.safe_push (ls); tree sll = arginfo[i].simd_lane_linear ? boolean_true_node : boolean_false_node; - clone_info.safe_push (sll); + simd_clone_info.safe_push (sll); } break; case SIMD_CLONE_ARG_TYPE_MASK: