From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf1-x42a.google.com (mail-pf1-x42a.google.com [IPv6:2607:f8b0:4864:20::42a]) by sourceware.org (Postfix) with ESMTPS id 4247C3858010 for ; Sat, 30 Jul 2022 15:31:49 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 4247C3858010 Received: by mail-pf1-x42a.google.com with SMTP id k15so1000306pfh.1 for ; Sat, 30 Jul 2022 08:31:49 -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=H9kV27ugQQ0V/N37o9gDyiLtPLwn4z7YZbT+XMp2zks=; b=ubgE057Q4dOSMA+g5PDC6/sU16wQzZ2Sdl1Xxqkbjv16rkjLw2h1niE/9ZwQXHdPZB eyrWmebdEkQ1BzFWzEqstYxjc33mn0/Q5hQJX9Ngh4VSUX5ddC+SsmBk7XeLjebBGLDr BB29zdn7VFIEni0ek5AYvgu///jR4DbYfK3d+IA/p98OaxzcT2Dg0XqhTWtDZ+QfMtTv RzyAvN8zjpIrfSyxKlXnHqzjAIHtKvlE7TGonFl4SWJ993VnpUjEBDdsivnoCSGYSfSR vWdaspS3RchkhMWioMBgZaNkcAozKRC8iVjiyFzxilfJ+7vEHsEqCfGvFkR58+QT1CVn +8oQ== X-Gm-Message-State: AJIora9a+xkYw9WqvqyFnxLWrBL4E01fBM6Yh6YZ8LByyrK6hZWXvsBR JmTgoEYrEJoxCIRLLCeJ87QJSz/3p0Q= X-Google-Smtp-Source: AGRyM1stjpw2lo0DCFvPF78vr/Mdt54bKCFVAimp7XJIJ9Qe56xNNm7zj4h0GH1dHLGrIwek5uxeuA== X-Received: by 2002:a65:45cb:0:b0:41b:87ad:2a75 with SMTP id m11-20020a6545cb000000b0041b87ad2a75mr6964701pgr.604.1659195107489; Sat, 30 Jul 2022 08:31:47 -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 b16-20020a170902d51000b0016d1f474653sm5961197plg.52.2022.07.30.08.31.46 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 30 Jul 2022 08:31:46 -0700 (PDT) Message-ID: <35d1df93-134c-43ed-6d8d-d3ad9cf26c66@gmail.com> Date: Sat, 30 Jul 2022 09:31:44 -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/106422 - verify block copying in forward threading Content-Language: en-US To: gcc-patches@gcc.gnu.org References: <20220729084701.C077113A1B@imap2.suse-dmz.suse.de> From: Jeff Law In-Reply-To: <20220729084701.C077113A1B@imap2.suse-dmz.suse.de> 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: Sat, 30 Jul 2022 15:31:50 -0000 On 7/29/2022 2:47 AM, Richard Biener via Gcc-patches wrote: > The forward threader failed to check whether it can actually duplicate > blocks. The following adds this in a similar place the backwards threader > performs this check. > > Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed. > > PR tree-optimization/106422 > * tree-ssa-threadupdate.cc (fwd_jt_path_registry::update_cfg): > Check whether we can copy thread blocks and cancel the thread if not. > > * gcc.dg/torture/pr106422.c: New testcase. I'm back from PTO.  This looks obviously correct to me. jeff