From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pj1-x1034.google.com (mail-pj1-x1034.google.com [IPv6:2607:f8b0:4864:20::1034]) by sourceware.org (Postfix) with ESMTPS id 9A6203857836 for ; Fri, 10 Jun 2022 20:09:47 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 9A6203857836 Received: by mail-pj1-x1034.google.com with SMTP id gc3-20020a17090b310300b001e33092c737so375507pjb.3 for ; Fri, 10 Jun 2022 13:09:47 -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=DFCix2qE+BoinmmTAiUDan7FSlmA/YZ/PYT5hUAE/84=; b=lLo2EYy1btIYF7e9y60ph4aei7/aIs6TT0RTNoaLO6OPwnLxrCnWEnQ6HlEjVQQBMQ LA/rHQN3kOdfhi/jKCjPLlLtR700rsrGcJQ4wNNYOcSiNFpNuDSCFel5r/luu57A6ZJn RCD6Tn5N1q8rBDofSl6xcxFR3p9e+K4TEpn4Jz1vyof3+8BSw+OSFZ7VXuRnua8nJFyt mJNh3z+QRkb0hdKHrNK0A94y74V1eAwNr1dHtLmu6XE749k0yLyRfWX1EF9DD3gLHX1R uGmWJigl0dXTNqS9cp6ODjrBzTCFjkfSECAYX6FgHJoLA6WJ+6XUeXhmRfRCAFi9o76R /nkg== X-Gm-Message-State: AOAM533O2yJsceayAr8Jq35+OApfyhey0ojIu+5Bc4wCrpO6aFgg/+3/ vtFQ9D/MyksOotZ/8RTI6G/14DzlUtBYWg== X-Google-Smtp-Source: ABdhPJy1Cm1JgKYAFn5gVGTybnaQw/G73RE9Ex808Xfs+G9OUtF1sov1Fu0H1kTCZ2rPmDqwqkBQxA== X-Received: by 2002:a17:902:ec82:b0:167:70f6:905e with SMTP id x2-20020a170902ec8200b0016770f6905emr31331623plg.114.1654891786278; Fri, 10 Jun 2022 13:09:46 -0700 (PDT) Received: from [172.31.0.204] (c-73-63-24-84.hsd1.ut.comcast.net. [73.63.24.84]) by smtp.gmail.com with ESMTPSA id g13-20020a170902d1cd00b0016767ff327dsm123773plb.129.2022.06.10.13.09.45 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 10 Jun 2022 13:09:45 -0700 (PDT) Message-ID: <0eb46b88-232e-01a9-5b40-a850c796d763@gmail.com> Date: Fri, 10 Jun 2022 14:09:44 -0600 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.10.0 Subject: Re: [PATCH] regrename: Fix -fcompare-debug issue in check_new_reg_p [PR105041] Content-Language: en-US To: gcc-patches@gcc.gnu.org References: <272d6c10-b6eb-a656-1a7c-b071c138b0ed@linux.vnet.ibm.com> <20220610154003.GR25951@gate.crashing.org> From: Jeff Law In-Reply-To: <20220610154003.GR25951@gate.crashing.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3.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, T_SCC_BODY_TEXT_LINE 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: Fri, 10 Jun 2022 20:09:49 -0000 On 6/10/2022 9:40 AM, Segher Boessenkool wrote: > Hi! > > On Fri, Jun 10, 2022 at 07:52:57PM +0530, Surya Kumari Jangala wrote: >> In check_new_reg_p, the nregs of a du chain is computed by obtaining the MODE >> of the first element in the chain, and then calling hard_regno_nregs() with the >> MODE. But the first element of the chain can be a DEBUG_INSN whose mode need >> not be the same as the rest of the elements in the du chain. This >> was resulting in fcompare-debug failure as check_new_reg_p was returning a >> different result with -g for the same candidate register. We can instead obtain >> nregs from the du chain itself. > Great, thanks for finding and fixing this! I cannot approve it, you'll > have to wait for someone who can. It looks fine to me, but that does > not mean so much in regrename.c :-) I'll go ahead and ACK the regrename bits.  So as soon as you're happy with the testsuite bits, this is good to go. jeff