From patchwork Thu Feb 23 06:56:20 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakub Jelinek X-Patchwork-Id: 60803 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp169917wrd; Wed, 22 Feb 2023 22:57:12 -0800 (PST) X-Google-Smtp-Source: AK7set+FfSfCyiNOZIHDCBFNJupIbvUu7bt7EBb2hHw5GLLr7izQ21lMgUW6mBN4Dz2rSq03Savt X-Received: by 2002:a17:906:f14a:b0:8b1:7e88:c20f with SMTP id gw10-20020a170906f14a00b008b17e88c20fmr21900855ejb.15.1677135432253; Wed, 22 Feb 2023 22:57:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677135432; cv=none; d=google.com; s=arc-20160816; b=BcHNoLEXSLL2tWAk2OSyiVcf7dPbH6V83dIKFYD6ZGK/XUf1eJ+4mT3BAQGY3gHoif MEOJ2gR427XeV3nQrat/oq6O3l3yi1LGJSC6ifg+HcCi+D4X0XuhsDRIaoNGv3FIbYGX veqF9rAcx+E4bfBn8zxG5GVwlE2Q07BKZwgbJ/YqQPoRPQt3LunlZ+mfezQhZp23xYLJ ehpXEWZPqCHoTmqRV1H7a237Jgew++KSQkNFAxYfqcTEeLFY5ZOWchqmUoeAVzFyI35e NkxgfmNAuwvduKW3tvwApEf4wsvjN2yWDZ+XREB7aYdExhmOVM67eUhKPsOf1ddRmP9V 1M6w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:from:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence :content-disposition:in-reply-to:mime-version:references:message-id :subject:cc:to:date:dmarc-filter:delivered-to:dkim-signature :dkim-filter; bh=Nuha9YYwimsJ/xElF+dMJlsSgzXWQTmD3vZpdDsTa90=; b=x2de1qREZr6aaC4zvxffpJ80mnkkVPrxurbvq0q5pUodn3cQ27lWMpsKIbvYx+tUR1 ElbVSr9QZVbbUvIZKdwfIdG4KdFHhpLMDG4mu+BwVPOWSG/zLkvA2diQw+qw35xLGVe5 k7yh3uJ6EN5KNqwB/pw99fyye2xbGT+v41fXYLehaEnaFnqnCmalet2o/GAecZnK2Pti batIID2mpLk5/XRT7UaUgpx0xkX5CJEPuo91oNoyrG1Yi3+Ilzk9IoHdyG6huYzCVS71 rRKX6Ky34aBkHFMDHejeYVYtN/UlcG+1LNwGDxjfoJ7EFHD5WxdXNs0DvLm2gDSeR7+u 2cgQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=Xl8uGOox; 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=gnu.org Received: from sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id 15-20020a170906018f00b008ddf3c182fdsi9127690ejb.185.2023.02.22.22.57.12 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Feb 2023 22:57:12 -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=@gcc.gnu.org header.s=default header.b=Xl8uGOox; 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=gnu.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 1011238582B7 for ; Thu, 23 Feb 2023 06:57:11 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1011238582B7 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1677135431; bh=Nuha9YYwimsJ/xElF+dMJlsSgzXWQTmD3vZpdDsTa90=; h=Date:To:Cc:Subject:References:In-Reply-To:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=Xl8uGOoxusXgym95YRh5JjzadRa3Ugi7JCEBzBY4pEhR+K3sTgm6iFzlXKW1v6CkA ig64yc6hfReXsDzwyPTzw9IZFfWVt7bFFO5kLYUTnLHGz0L5DsIitDhJbeVojRUUSJ zVIDTg0x1q22DrLLfQ0WsNPqGKIX93OMnZg+lODk= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org 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 DAE273858D33 for ; Thu, 23 Feb 2023 06:56:26 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org DAE273858D33 Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-232-8OimYPyCPR6VBsqa0H97XQ-1; Thu, 23 Feb 2023 01:56:24 -0500 X-MC-Unique: 8OimYPyCPR6VBsqa0H97XQ-1 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 8984B3C0E456; Thu, 23 Feb 2023 06:56:24 +0000 (UTC) Received: from tucnak.zalov.cz (unknown [10.39.192.62]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 491E1492C14; Thu, 23 Feb 2023 06:56:24 +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 31N6uLnQ505234 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Thu, 23 Feb 2023 07:56:22 +0100 Received: (from jakub@localhost) by tucnak.zalov.cz (8.17.1/8.17.1/Submit) id 31N6uKOJ505233; Thu, 23 Feb 2023 07:56:20 +0100 Date: Thu, 23 Feb 2023 07:56:20 +0100 To: Richard Biener Cc: gcc-patches@gcc.gnu.org Subject: [PATCH] ipa-prop: Fix another case of missing BUILT_IN_UNREACHABLE_TRAP handling [PR106258] Message-ID: References: MIME-Version: 1.0 In-Reply-To: X-Scanned-By: MIMEDefang 3.1 on 10.11.54.9 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline X-Spam-Status: No, score=-3.7 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_H2, 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.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Jakub Jelinek via Gcc-patches From: Jakub Jelinek Reply-To: Jakub Jelinek Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1758603963356744476?= X-GMAIL-MSGID: =?utf-8?q?1758603963356744476?= On Wed, Feb 22, 2023 at 07:46:46PM +0100, Richard Biener wrote: > Ok for stage1 Thanks. In that case, can we get at least following into GCC 13, another spot that handles in IPA just BUILT_IN_UNREACHABLE and not BUILT_IN_UNREACHABLE_TRAP? Bootstrapped/regtested on x86_64-linux and i686-linux. 2023-02-23 Jakub Jelinek PR middle-end/106258 * ipa-prop.cc (try_make_edge_direct_virtual_call): Handle BUILT_IN_UNREACHABLE_TRAP like BUILT_IN_UNREACHABLE. Jakub --- gcc/ipa-prop.cc.jj 2023-02-22 20:50:27.422519757 +0100 +++ gcc/ipa-prop.cc 2023-02-22 20:52:04.904112685 +0100 @@ -3850,6 +3850,7 @@ try_make_edge_direct_virtual_call (struc { if (!t || fndecl_built_in_p (t, BUILT_IN_UNREACHABLE) + || fndecl_built_in_p (t, BUILT_IN_UNREACHABLE_TRAP) || !possible_polymorphic_call_target_p (ie, cgraph_node::get (t))) {