From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pl1-x62a.google.com (mail-pl1-x62a.google.com [IPv6:2607:f8b0:4864:20::62a]) by sourceware.org (Postfix) with ESMTPS id 2250038582A6 for ; Mon, 1 Aug 2022 01:23:20 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 2250038582A6 Received: by mail-pl1-x62a.google.com with SMTP id x10so8434983plb.3 for ; Sun, 31 Jul 2022 18:23:20 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:references:from:in-reply-to :content-transfer-encoding; bh=vAZLeBrcpUUIC3DRgJeCdsyNT5suOm19nW7DuhUtOtg=; b=q3WhVjDicvuJb2unbJ1zRWI1iWGJeXsrH6z+FrzQ5RR9U24uTpA/LmA9Vpkuee4Cxf XI0gB4mHXGKGrFiUodgcu9wR4CVvTns6YsxvQRlrDI5lcJTLY0glqzsfDw45xrbskeSk 7QGU36Ng5JBjcCfULr9q3E4GaEUdpAxfGb26VdaJUtZP7POJZhiaB1It5Fx1sK3TZr3n if2fojSCw4yYwVJS2YX/XejLlCqgHmC2YYZ866Wrfh/DfAQha1Ra5WlJdLUJ5cmBHBYp tvrZHsQSGKWdTcyFYs/wzbwBB2bVcXQphNMzBKJGpkWyCx/9pFXjpEm3WzukPWndHAlv 0njw== X-Gm-Message-State: ACgBeo1n15+p1KYj7aSBweYK6I3M3IwianeGPA2rmxtFNFSbqVmkZ2Qh +stx6WeRKQhIX67H57YGQIA1jSIzO80= X-Google-Smtp-Source: AA6agR50jedJ523+zJBiZa6ptl3CPdBzJ7Yz7XWuIHCH/XDFgJTK60EPPgEafABJXXD+d3GiB+5gKQ== X-Received: by 2002:a17:90a:982:b0:1ef:f525:9801 with SMTP id 2-20020a17090a098200b001eff5259801mr16671836pjo.191.1659316998517; Sun, 31 Jul 2022 18:23:18 -0700 (PDT) Received: from [172.31.0.204] (c-73-98-188-51.hsd1.ut.comcast.net. [73.98.188.51]) by smtp.gmail.com with ESMTPSA id h15-20020a170902f54f00b0016dcbdf9492sm7031922plf.92.2022.07.31.18.23.17 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 31 Jul 2022 18:23:17 -0700 (PDT) Message-ID: Date: Sun, 31 Jul 2022 19:23:16 -0600 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: [PATCH] tree-optimization/105679 - disable backward threading of unlikely entry Content-Language: en-US To: gcc-patches@gcc.gnu.org References: <20220729085417.4B50F13A1B@imap2.suse-dmz.suse.de> From: Jeff Law In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, NICE_REPLY_A, 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 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-List-Received-Date: Mon, 01 Aug 2022 01:23:22 -0000 On 7/31/2022 1:17 PM, Iain Sandoe via Gcc-patches wrote: > Hi Richi, > >> On 29 Jul 2022, at 09:54, Richard Biener via Gcc-patches wrote: >> >> The following makes the backward threader reject threads whose entry >> edge is probably never executed according to the profile. That in >> particular, for the testcase, avoids threading the irq == 1 check >> on the path where irq > 31, thereby avoiding spurious -Warray-bounds >> diagnostics > This breaks bootstrap on i686-darwin{9,17} with what looks like a valid warning (werrors on stage2) > > cc1plus … -O2 -Wall … is enough to. > > I can repeat it on a cross from x86_64-darwin19, so I can probably reduce the .ii (it’s like 2M5 raw) and file a PR if you like - depends if the solution might be obvious to you … I suspect what's happening here is by suppressing the jump thread we're leaving an unexecutable path through the CFG in the IL.   The warning is likely on that unexecutable path or at a join point where the unexecutable path re-joins the main path through the CFG. Jeff