From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id 1CD673858D33 for ; Sat, 2 Dec 2023 22:45:39 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 1CD673858D33 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 1CD673858D33 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1701557140; cv=none; b=JkZ4/VpiqXdXOcgh1LO4tux6fwXzAUbOwaGnXHhwo7P3KLDp85378QwhOoQFz7X1yNKyc5hRbOENNIE3iVSnq8BeOdjcW8yW8rVE2ANMgV7557z6ZDav0YP9l5DmrXXRv5cHmp5iCkOt/YSa3HOFeH6XazJ4YIiZ3nv3Y0UYAik= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1701557140; c=relaxed/simple; bh=KkpsePFg79x6HI3Ca8NoCcshHKEVLx2nl22K2jcZS9Q=; h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version; b=ayDzjJhwHbfi5mBIWE1srDThoZTv62w9CNVfYqhvsYBNTUD+AwaDsm+hPr+WgnHF4DarVMxqi7tmcjma2WWfD2gOT592SnRvDhP1vTJuhv/lDp0niZpqRlrMbD5zjM8yLF8n9vbmVqyo4ew/3apvocOoo5NVeg7PEtviX+uRiVc= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1701557138; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references; bh=EshSUpVEXx4p/xh8dLRuwRHZN0CibHmZFZpuCVWs8Jk=; b=ExyxnnBz3tEz3K2pq8XrlFs8Juacxf1s8L5taas3dmODBq10BgBOZxpmxzwwb8EjTcxLPs CF9czpPeDW4d1G3qm1y8cMJnpeNsXX4MkU6oCeDE5O25JUR0j0Hy46U4BDMkMHs647oIB6 qXvZ494YG3b6A5q2CUGvrBG4wH82VyE= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-34-v-hmO43yP9uY0QmfF1GgNQ-1; Sat, 02 Dec 2023 17:45:33 -0500 X-MC-Unique: v-hmO43yP9uY0QmfF1GgNQ-1 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 044F7101A529; Sat, 2 Dec 2023 22:45:33 +0000 (UTC) Received: from tucnak.zalov.cz (unknown [10.39.195.157]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A7C31492BE8; Sat, 2 Dec 2023 22:45:32 +0000 (UTC) Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.17.1/8.17.1) with ESMTPS id 3B2MjTvV3628991 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Sat, 2 Dec 2023 23:45:30 +0100 Received: (from jakub@localhost) by tucnak.zalov.cz (8.17.1/8.17.1/Submit) id 3B2MjRAP3628990; Sat, 2 Dec 2023 23:45:27 +0100 Date: Sat, 2 Dec 2023 23:45:26 +0100 From: Jakub Jelinek To: Eric Botcazou , Segher Boessenkool , Jeff Law , gcc-patches@gcc.gnu.org, richard.sandiford@arm.com Subject: Re: [PATCH] pro_and_epilogue: Call df_note_add_problem () if SHRINK_WRAPPING_ENABLED [PR112760] Message-ID: Reply-To: Jakub Jelinek References: MIME-Version: 1.0 In-Reply-To: X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.9 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Spam-Status: No, score=-3.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE,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 List-Id: On Sat, Dec 02, 2023 at 11:04:04AM +0000, Richard Sandiford wrote: > I still maintain that so much stuff relies on the lack of false-positive > REG_UNUSED notes that (whatever the intention might have been) we need > to prevent the false positive. Like Andrew says, any use of single_set > is suspect if there's a REG_UNUSED note for something that is in fact used. The false positive REG_UNUSED in that case comes from (insn 15 14 35 2 (set (reg:CCZ 17 flags) (compare:CCZ (reg:DI 0 ax [111]) (reg:DI 1 dx [112]))) "pr112760.c":11:22 12 {*cmpdi_1} (expr_list:REG_UNUSED (reg:CCZ 17 flags) (nil))) (insn 35 15 36 2 (set (reg:CCZ 17 flags) (compare:CCZ (reg:DI 0 ax [111]) (reg:DI 1 dx [112]))) "pr112760.c":11:22 12 {*cmpdi_1} (expr_list:REG_DEAD (reg:DI 1 dx [112]) (expr_list:REG_DEAD (reg:DI 0 ax [111]) (nil)))) ... use of flags Haven't verified what causes the redundant comparison, but postreload cse then does: 110 if (!count && cselib_redundant_set_p (body)) 111 { 112 if (check_for_inc_dec (insn)) 113 delete_insn_and_edges (insn); 114 /* We're done with this insn. */ 115 goto done; 116 } So, we'd in such cases need to look up what instruction was the earlier setter and if it has REG_UNUSED note, drop it. Jakub