From patchwork Fri Nov 3 11:00:48 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Biener X-Patchwork-Id: 161238 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:8f47:0:b0:403:3b70:6f57 with SMTP id j7csp939621vqu; Fri, 3 Nov 2023 04:01:25 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEZbW6ghdS3aQYCvdWiN863myiCmTQlqGAd4bqPlm1SiT5Z+Gd+3Xmgr3Cnr0RXhRxC4sXR X-Received: by 2002:a1f:2f50:0:b0:49d:120c:3c2a with SMTP id v77-20020a1f2f50000000b0049d120c3c2amr14613663vkv.11.1699009284853; Fri, 03 Nov 2023 04:01:24 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1699009284; cv=pass; d=google.com; s=arc-20160816; b=zYuGodVwNFxXRS8ahZSF+2n9CmRJ7DjWzMwLQdMYFDLqazOX5hcCumWyJxIj/97FKy QSyvO6hhHwC9i8KqxjtdAUCn1KRB9ydbLbugpf6cPN9zqfNEeifZaUAsTp5aCcaT+sVj aYUycGDxOAn2ZgwJ/T6qU5yYKmSzC2Dg3ObmtnaDjdH754Y0lTBneuef489SwC4UZcbV UD+f+LbTHrezA8FIu+EVaLx+XnEuHwXt8wJkOrcNd8m0ygTY7NT0PIzhkh/K0GN0p+9Z HrVEFrnOz/qjoCj8lZqBP5UPquXta/5dpTn63he2C1D77IY9ORjqVEBAV2aQFQIVvYbh Ss5Q== 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=ZkRT/f7lR7KLsROpRh06CkcXrANloXxrVtt3yZqHHO0=; fh=hPrbWPhweUx4V0GV9uXJqbyAzg2ABmTz7kczrAQqMmM=; b=NQpz/6E38M1SWjas3df0ROUGezNQkQ4ZtePEEV3f5eCTNloeqILRLmbgillVF2tt3w Xbh+AdttU1JOLRYFq53+ceZPT7Q4WNmfRrPT9ZD03yF7Tf9LanzRooKAtlSz9GX3x5vI akIfd+MSxNqPbsNFX3LDlMEy0cx6WHTFRuxqvs5FNzuB/lGWXwsaVZTxZOE7ahzaUY/0 lOS7/CeYuZUY/zenOfrQYMgzCDUDETsiUeBkosMqlCJUHD2ng0v6bpXmqgRDgOaX3rjO lafl7vabc9SNTA+MExn4PeOtwC4RXQ//iRzmNWSI3lgAXvVWgY4oL3gTw1h8fYUdHehZ F7Vg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=rqp8N+qM; dkim=neutral (no key) header.i=@suse.de header.b=tjnI5Zox; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 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. [8.43.85.97]) by mx.google.com with ESMTPS id ay9-20020a056122180900b00486d7515546si198069vkb.130.2023.11.03.04.01.24 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Nov 2023 04:01:24 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=rqp8N+qM; dkim=neutral (no key) header.i=@suse.de header.b=tjnI5Zox; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 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 CBF6D38582B0 for ; Fri, 3 Nov 2023 11:01:22 +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 [IPv6:2001:67c:2178:6::1c]) by sourceware.org (Postfix) with ESMTPS id D7BF43858C27 for ; Fri, 3 Nov 2023 11:00:49 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org D7BF43858C27 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 D7BF43858C27 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2001:67c:2178:6::1c ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1699009260; cv=none; b=Nmkf/bK4TcvfFTC9MhEVVytO5mpPXTUJ7FhmIZNKXpVWpgnHOrSA89cyO502TbMw/JhdUAb/hyZ9mQWraiA2JDd3vocwV3GwsKrc9Kc+36DKsgjme5FuaRC9K8a1LMNOL5CBytaomZPLAn+6yfOyq7sKXyuRrzFXQrmyt936YD4= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1699009260; c=relaxed/simple; bh=hZRmFeEfx54JtzqpAxZFvUBchJLgeNqA690PFWJgrZg=; h=DKIM-Signature:DKIM-Signature:Date:From:To:Subject:MIME-Version: Message-Id; b=hBEtPtyFIOKnoUFPWdEDpMrD2laxQHu+ZOYJEXWVl1QRG07zdLFXF5haMjeI40kvTWFLQx3ZdYhrIy7LvYyaQarRTLdNP0qj+fe9U061rR2xrhvMa8HdnW2wfHS874MXVHuYmgk/RxPWmeeEfcrjmnPju4SrRs8F7zQxeKHQ03g= 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 B1643211CE for ; Fri, 3 Nov 2023 11:00:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1699009248; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version:content-type:content-type; bh=ZkRT/f7lR7KLsROpRh06CkcXrANloXxrVtt3yZqHHO0=; b=rqp8N+qMwsELYI241NSvNPScz/o3p7rG7t3Cgiv8HLyQFUuFo2TirRmRnapOfAI/d/Kw+X QeJJLSd5wMNEUEm2CUP+UA4iye+9v/Oa0ogTwg24KX36QZqzZBEqEpn28H6ql68sNJiqp+ Q7nNkxa0JkjZ7td7FlDrVmt+rn66+Pw= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1699009248; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version:content-type:content-type; bh=ZkRT/f7lR7KLsROpRh06CkcXrANloXxrVtt3yZqHHO0=; b=tjnI5ZoxlrwboOtF7Z0SihiVKPMFd7yu3/6YFnAIcD8xzXZMkvj9dE1V+qsVMPgqK93uAN 0+Ym2n5DXNkKSFDw== 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 9D5211348C for ; Fri, 3 Nov 2023 11:00:48 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id pN4vJeDSRGXLKAAAMHmgww (envelope-from ) for ; Fri, 03 Nov 2023 11:00:48 +0000 Date: Fri, 3 Nov 2023 12:00:48 +0100 (CET) From: Richard Biener To: gcc-patches@gcc.gnu.org Subject: [PATCH] tree-optimization/112366 - remove assert for failed live lane code gen MIME-Version: 1.0 Message-Id: <20231103110048.9D5211348C@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, 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: 1781540360109557595 X-GMAIL-MSGID: 1781540360109557595 The following removes a bogus assert constraining the uses that could appear when a built from scalar defs SLP node constrains code generation in a way so earlier uses of the vector CTOR components fail to get vectorized. We can't really constrain the operation such use appears in. Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed. PR tree-optimization/112366 * tree-vect-loop.cc (vectorizable_live_operation): Remove assert. --- gcc/tree-vect-loop.cc | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/gcc/tree-vect-loop.cc b/gcc/tree-vect-loop.cc index 3b28c826b3b..2a43176bcfd 100644 --- a/gcc/tree-vect-loop.cc +++ b/gcc/tree-vect-loop.cc @@ -10778,7 +10778,7 @@ vectorizable_live_operation (vec_info *vinfo, stmt_vec_info stmt_info, || !PURE_SLP_STMT (vect_stmt_to_vectorize (use_stmt_info)))) { /* ??? This can happen when the live lane ends up being - used in a vector construction code-generated by an + rooted in a vector construction code-generated by an external SLP node (and code-generation for that already happened). See gcc.dg/vect/bb-slp-47.c. Doing this is what would happen if that vector CTOR @@ -10791,11 +10791,6 @@ vectorizable_live_operation (vec_info *vinfo, stmt_vec_info stmt_info, && !vect_stmt_dominates_stmt_p (SSA_NAME_DEF_STMT (new_tree), use_stmt)) { - enum tree_code code = gimple_assign_rhs_code (use_stmt); - gcc_checking_assert (code == SSA_NAME - || code == CONSTRUCTOR - || code == VIEW_CONVERT_EXPR - || CONVERT_EXPR_CODE_P (code)); if (dump_enabled_p ()) dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location, "Using original scalar computation for "