From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pj1-x1035.google.com (mail-pj1-x1035.google.com [IPv6:2607:f8b0:4864:20::1035]) by sourceware.org (Postfix) with ESMTPS id BF89A3858C3A for ; Thu, 30 Dec 2021 16:33:18 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org BF89A3858C3A Received: by mail-pj1-x1035.google.com with SMTP id n30-20020a17090a5aa100b001b2b6509685so6299558pji.3 for ; Thu, 30 Dec 2021 08:33:18 -0800 (PST) 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:cc:references:from:in-reply-to :content-transfer-encoding; bh=QmjnqrmpI8tjUQCn4tjwdfLLzBy2Qu3L3u0bpMN3G5k=; b=Y6rpfsyCpcVNUuaSVilxFxo/PfL9c8hxEdiM/gE+uGJpJaxVNkUQIlZ4cwYQ4kpjv0 PuZzXDk0d1cfXD58A8kDVEJf4eoU0mn9KYTT/KtiiR/dfovoVu1/xCn0Nk2Lu4GlT2Vc xCyjqyN0f/J8/vu8QMl9TIo4hWPhmTqkiNj8XBEu1mQp6G0Ep2bOmnOeGUpS8b2d5azh 5svtmQJn6jngzs5cTqW30cXrl6ljU1KSCYytqEFt1L5w++JeC1tKFbY2JjDleVacaEo3 bsWuRyQT64Ywa30bDdNtN84xJ0mpOCCBDz8IrjivzOTrADz+3jRnVL4pKBFG12vRn6Eq Z2Wg== X-Gm-Message-State: AOAM530nU9YSsm4pXMrLDHWA0zJ/QXAi9730u5JNsivtmapJZsGejEWs GSlvwMDexoyNvlrWcOx2rm0= X-Google-Smtp-Source: ABdhPJyWiK8slWQNvEBQs/S1smtv9d1pTxrdNaSHxqbqlC8RR6aF6ANk/Lb5z8I2vJ1g79t/rFmaMg== X-Received: by 2002:a17:902:82c5:b0:148:94d4:b745 with SMTP id u5-20020a17090282c500b0014894d4b745mr32777153plz.85.1640881997892; Thu, 30 Dec 2021 08:33:17 -0800 (PST) Received: from [172.31.0.175] (c-98-202-48-222.hsd1.ut.comcast.net. [98.202.48.222]) by smtp.gmail.com with ESMTPSA id a64sm23106589pge.72.2021.12.30.08.33.17 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 30 Dec 2021 08:33:17 -0800 (PST) Message-ID: <43a0dee1-b3ce-bb43-789f-f6ca363cddb3@gmail.com> Date: Thu, 30 Dec 2021 09:33:16 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.4.0 Subject: Re: [PATCH] regrename: Fix -fcompare-debug issue in find_rename_reg [PR103756] Content-Language: en-US To: Jakub Jelinek , Richard Biener Cc: gcc-patches@gcc.gnu.org References: <20211229101901.GU2646553@tucnak> From: Jeff Law In-Reply-To: <20211229101901.GU2646553@tucnak> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3.8 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.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) 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: Thu, 30 Dec 2021 16:33:20 -0000 On 12/29/2021 3:19 AM, Jakub Jelinek wrote: > Hi! > > The r12-5978 change caused a -fcompare-debug issue, because without > -g a chain might start with a noop move, but with -g there could be > one or more DEBUG_INSNs in the chain before the noop move and so > regrename could make different decisions between -g and -g0. > > Note, I must say I don't really understand the original change much, > if we want to make sure the noop moves are removed, couldn't regrename > during building of those du chains simply remove the noop moves instead? > > Anyway, bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? > > 2021-12-28 Jakub Jelinek > > PR rtl-optimization/103756 > * regrename.c (find_rename_reg): Test noop_move_p on the first > non-debug insn in the chain rather than on the first insn. > > * g++.dg/opt/pr103756.C: New test. Sadly I wasn't ever able to trigger a nop-move in this code to investigate how the nop-move  more thoroughly.  IIRC Jojo indicated it occurred with some local changes he was playing with. The patch is fine, of course. jeff