From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm1-x333.google.com (mail-wm1-x333.google.com [IPv6:2a00:1450:4864:20::333]) by sourceware.org (Postfix) with ESMTPS id 52F8F385783F for ; Fri, 13 Jan 2023 10:49:42 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 52F8F385783F Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=adacore.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=adacore.com Received: by mail-wm1-x333.google.com with SMTP id j34-20020a05600c1c2200b003da1b054057so2765213wms.5 for ; Fri, 13 Jan 2023 02:49:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore.com; s=google; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:from:to:cc:subject:date:message-id:reply-to; bh=RRT9eEdpaQO7sr6LtUD17Alg5yKLCIzNTeGGPdgogvs=; b=aUV+hmi/XC8tEP//pyTlDzylAyNsgy/d37NzHYnTtpgFH718/1IKIyOg/feMbkHgIY T+IaNoNgGSi3Q8Lki4p+pqcjZczWlJhCQLdCzF5Pqx/X9bqLF++zxOGQkqVcueXHFeW3 TsL9vvjhPKv6JPp7/NZaEXco0+1VXFpHk6TjffQ3SXIDHERxO901LG4G/DWQdNNyUE25 nRAK+BU/8o/drtF6XfMdK+dHwTr0etGNtOw8hklEUPrQMeAlAYEqa37DHETiAOgHw19O j0Iwc7HqnTnOKnSlj2NEZwB8Y5p0YqRLFk2jYjMMTVGQgl0XieYFBVPBLwg3/Tld95Dd 8I1w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=RRT9eEdpaQO7sr6LtUD17Alg5yKLCIzNTeGGPdgogvs=; b=gbwR3QcDdenimBk/BrmhR6n+y0Eoer51bzDeh2lLKMpZaMEoXYY6iUkacPoIT85u9l /bsXRI7UG5b6pqo5eAeObSu/I2MGvDVSd9c+ysf41ohgiwdASH1kOrOL0kluM7OWEcTF 7AWyA57Ri/uZTwZ/PjrNgoRKHYz1aPE0mZB8vKWVRseza4Ts8Ob/ntUDeAuExkRQpqQP IWE8PTCWrn1Z4LnNHD0qB2F9XijpoLguae9bOdg0d4eE6rxX/nGTyTVhi9iSQIcSd/cd F73Z294aHQmobMYx2VbpKVFcf0ZqDdktCxJuHqjtabWhtMoyftOegG2c4mcAE1V2p7bK /0mQ== X-Gm-Message-State: AFqh2koNWOCOycu0blIp5r5i1VH1jfdATOTvfYifagRzCY0ovskD9SIS M08+Zam1K1yCs5PABCrVrssLPya1/9fTDSN/ X-Google-Smtp-Source: AMrXdXtot6qz31Guwqh0HhVxYbb5o8+6GqjnjUA+iMYTsBVFG6PrEFeWUbglUgApT0D9gulN8x8G/w== X-Received: by 2002:a05:600c:3545:b0:3d9:a145:9ab with SMTP id i5-20020a05600c354500b003d9a14509abmr38633494wmq.39.1673606980863; Fri, 13 Jan 2023 02:49:40 -0800 (PST) Received: from fomalhaut.localnet ([2a01:e0a:8d5:d990:e654:e8ff:fe8f:2ce6]) by smtp.gmail.com with ESMTPSA id n1-20020a5d67c1000000b002bc7f64efa3sm11312393wrw.29.2023.01.13.02.49.40 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Jan 2023 02:49:40 -0800 (PST) From: Eric Botcazou X-Google-Original-From: Eric Botcazou To: gcc-patches@gcc.gnu.org Subject: [PATCH] Fix PR rtl-optimization/108274 Date: Fri, 13 Jan 2023 11:49:04 +0100 Message-ID: <4771224.GXAFRqVoOG@fomalhaut> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="nextPart1840223.tdWV9SEqCh" Content-Transfer-Encoding: 7Bit X-Spam-Status: No, score=-10.4 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,KAM_NUMSUBJECT,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,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 List-Id: This is a multi-part message in MIME format. --nextPart1840223.tdWV9SEqCh Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Hi, unlike other IPA passes, the ICF pass can be run at -O0 and some testcases rely on this in the testsuite. Now it effectively creates a tail call so the DF information needs be updated in this case after epilogue creation. Tested on x86-64/Linux, OK for mainline? 2023-01-13 Eric Botcazou PR rtl-optimization/108274 * function.cc (thread_prologue_and_epilogue_insns): Also update the DF information for calls in a few more cases. -- Eric Botcazou --nextPart1840223.tdWV9SEqCh Content-Disposition: attachment; filename="pr108274.diff" Content-Transfer-Encoding: 7Bit Content-Type: text/x-patch; charset="utf-8"; name="pr108274.diff" diff --git a/gcc/function.cc b/gcc/function.cc index d975b001ec9..95f47d287c5 100644 --- a/gcc/function.cc +++ b/gcc/function.cc @@ -6261,7 +6261,10 @@ thread_prologue_and_epilogue_insns (void) /* Threading the prologue and epilogue changes the artificial refs in the entry and exit blocks, and may invalidate DF info for tail calls. */ - if (optimize) + if (optimize + || flag_optimize_sibling_calls + || flag_ipa_icf_functions + || in_lto_p) df_update_entry_exit_and_calls (); else { --nextPart1840223.tdWV9SEqCh--