From patchwork Sat Sep 14 07:23:35 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Pinski X-Patchwork-Id: 1985592 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=quicinc.com header.i=@quicinc.com header.a=rsa-sha256 header.s=qcppdkim1 header.b=R82/x6Dk; 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 4X5N3Z04hxz1y1C for ; Sat, 14 Sep 2024 17:24:42 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 3B8EB3858C5F for ; Sat, 14 Sep 2024 07:24:40 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) by sourceware.org (Postfix) with ESMTPS id 0A7C13858C78 for ; Sat, 14 Sep 2024 07:23:48 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 0A7C13858C78 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=quicinc.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 0A7C13858C78 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=205.220.180.131 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1726298630; cv=none; b=dSM8ZUu6sdJfg8jNQeTsxGqwEuU0x7DJcLRmpLxKN7L0F/pLohCN4Cd7D788EW9F5HGn+vwt6nRXqByd1zhZ5cFCCV6DL6BidQ4ccM/KIVchx53dpIby7Rxrhw2xQKxc8M3gAcsFZNyvcR6BELQ7DMIPmzu3pzRloM6GcaXg8IA= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1726298630; c=relaxed/simple; bh=VtBhEtnzXaWd+9T8YfCT3+o+aaIzy9UcC9LtqtiM3l0=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=kCxoKll4++Qw0SNuop+IjTiX5zIotiBJe4z2Td1anS+Qbk5lUJpRYIZ1GFHK9O185aAYEu9BINwldOPeKmP0uvEyT7lGmaoJi/qTq3oT4uhwk67qvTlgERUtizOXDqqcnvY9/vyAyAuQBsQoexcVnToaUFwsj+O0WLnyYg4uEiA= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from pps.filterd (m0279873.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 48E6QaVS026377 for ; Sat, 14 Sep 2024 07:23:47 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= cc:content-transfer-encoding:content-type:date:from:message-id :mime-version:subject:to; s=qcppdkim1; bh=i5uapr8+No1adlFayWIipN S4vUYVeOLgVlQy8puXd6I=; b=R82/x6Dk1Xy6KlPuunVayzRWwzhSEJJZlfHmbO VcAT2UsP0aXlqO4qDEMSS0+gRN3JHfPNcfzpXDhHc36dxih951MLUHveL4cRj4U4 Vn7Gw5jGE9CH6gAnSZjbLXPUlztmhOgOMlTscuF5QubZLNGVx3sAk1/zYg/SDAdR TomIixrD6uC+zJvWWPZSbdRsdKKOYVar2oYpOoXzqaniUGOyZ2quZZIVEBAj3v5j 1Lf1HgCQh614vg0eEp+5zsJSm4Fi23EBpwYK4Pz5ja7DW6vBmEw8znGhpngfmujo E0tTYvGy0s2t39Lvr93DwK7IYCXfqH4Zk0voDdmnoZacatzQ== Received: from nasanppmta05.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 41n4k0g4eh-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Sat, 14 Sep 2024 07:23:47 +0000 (GMT) Received: from nasanex01c.na.qualcomm.com (nasanex01c.na.qualcomm.com [10.45.79.139]) by NASANPPMTA05.qualcomm.com (8.18.1.2/8.18.1.2) with ESMTPS id 48E7Nkfc009066 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Sat, 14 Sep 2024 07:23:46 GMT Received: from hu-apinski-lv.qualcomm.com (10.49.16.6) by nasanex01c.na.qualcomm.com (10.45.79.139) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.9; Sat, 14 Sep 2024 00:23:46 -0700 From: Andrew Pinski To: CC: Andrew Pinski Subject: [PATCH] vect: release defs of removed statement Date: Sat, 14 Sep 2024 00:23:35 -0700 Message-ID: <20240914072335.59873-1-quic_apinski@quicinc.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-Originating-IP: [10.49.16.6] X-ClientProxiedBy: nalasex01a.na.qualcomm.com (10.47.209.196) To nasanex01c.na.qualcomm.com (10.45.79.139) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-ORIG-GUID: dCkvBt2KPtzuoE39VGE6Ci8mepHuJn2Z X-Proofpoint-GUID: dCkvBt2KPtzuoE39VGE6Ci8mepHuJn2Z X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.680,FMLib:17.12.60.29 definitions=2024-09-06_09,2024-09-06_01,2024-09-02_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxscore=0 lowpriorityscore=0 suspectscore=0 adultscore=0 phishscore=0 spamscore=0 malwarescore=0 bulkscore=0 impostorscore=0 mlxlogscore=675 clxscore=1015 priorityscore=1501 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2408220000 definitions=main-2409140050 X-Spam-Status: No, score=-13.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_LOW, SPF_HELO_NONE, SPF_NONE, 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 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 While trying to add use of simple_dce_from_worklist to the vectorizer so we don't need to run a full blown DCE pass after the vectorizer, there was a crash noticed due to a ssa name which has a stmt without a bb. This was due to not calling release_defs after the call to gsi_remove. Note the code to remove zero use statements should be able to remove once the use of simple_dce_from_worklist has been added. But in the meantime, fixing this bug will also improve memory usage and a few other things which look through all ssa names. gcc/ChangeLog: * tree-vect-loop.cc (optimize_mask_stores): Call release_defs after the call to gsi_remove with last argument of true. Signed-off-by: Andrew Pinski --- gcc/tree-vect-loop.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/gcc/tree-vect-loop.cc b/gcc/tree-vect-loop.cc index cc15492f6a0..62c7f90779f 100644 --- a/gcc/tree-vect-loop.cc +++ b/gcc/tree-vect-loop.cc @@ -12803,6 +12803,7 @@ optimize_mask_stores (class loop *loop) if (has_zero_uses (lhs)) { gsi_remove (&gsi_from, true); + release_defs (stmt1); continue; } }