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 F0E563858C56 for ; Wed, 31 Aug 2022 15:39:51 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org F0E563858C56 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pj1-x1035.google.com with SMTP id mj6so9454736pjb.1 for ; Wed, 31 Aug 2022 08:39:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc; bh=oGlZxTvnnfTCO8RGp9Tccq1KddQU2C41b6VEq1m6Cg4=; b=KBF0AE7oGoPAn911zYyk2+0GsmX3r37w5ndT31RjAVsWbt16DYaSyk0GKTFNK9RJMZ 5kOTaUIsZp//tgm4LXLztXYPICnssJ8hTUr5SvIv8gBMdUejNOt+8foawZHLTfwU59jy jVATatbTeg0Cnpz2m16KWPPADGH1fgQvsQdcmQUPMfRFBNajhveF/MB6cm667Xnpp4Hx F+2jAbv2SYLWC1JKhuE8RW/b5inQNj3fjRhb2v0htuvLphDuY10amDgZbYhNdULRhUlC R5Oaoi2UthJ9yf7Zcuix8q0NhfMbrUKycYQ3CiWLzzigKp7U9TUw7FH8vRBmm4zv7FFH fDRQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc; bh=oGlZxTvnnfTCO8RGp9Tccq1KddQU2C41b6VEq1m6Cg4=; b=Sur7SQyDJZMZgOo2PWfUgcxCVVLe7P/xqV4gyIqWc1yqxFPQfpF56piA1+T+R6XZve XjLBG0SHt9Ljr47BOxMTFW0Bq/j0/AFy2kc+bux8pd+m1SUeyWR+D4KLW/6PgOKwAiIp lo2V8Z3oIsCl8tK0Jc8tf7HFOkLVB3TLPMNfLPQXQ+NwuqvnE6E8DDLdmVfXmim27DHD XPe1fmby4f0uHNlqLjQg1LvaCCgzcwbmY+B8q6uvdFr66rP8CHACi0FMnrbsyaNXtwNX mIxZwiNJJM4zn5ivLYiZjyNL0plf7Wv3hrddFqHQQXEYjVeR9+Gx48k/8fPsPzXlsHK6 RSrg== X-Gm-Message-State: ACgBeo0AiO4JjiuTpyJvQcVy5KRon+hQD2hRamipnfQNGXMJDH23SqEP KaJi2dEaTWx6YDA16BN0V2B+lb7Pbgo= X-Google-Smtp-Source: AA6agR4ZvI31gAheRU9QPYtpuISAqUbVqbl5Jr2e0OxYM0nDq5mV5YkWz8Ji1qdRVJgru1uASR+IDw== X-Received: by 2002:a17:903:110c:b0:172:6a39:436b with SMTP id n12-20020a170903110c00b001726a39436bmr25996082plh.131.1661960390531; Wed, 31 Aug 2022 08:39:50 -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 e21-20020aa79815000000b0053612ec8859sm11389560pfl.209.2022.08.31.08.39.49 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 31 Aug 2022 08:39:50 -0700 (PDT) Message-ID: <0312d474-d2de-6c68-5812-5b79f1176b0b@gmail.com> Date: Wed, 31 Aug 2022 09:39:49 -0600 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.13.0 Subject: Re: [PATCH] sched1: Fix -fcompare-debug issue in schedule_region [PR105586] Content-Language: en-US To: gcc-patches@gcc.gnu.org References: 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,KAM_SHORT,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 List-Id: On 8/23/2022 5:49 AM, Surya Kumari Jangala via Gcc-patches wrote: > sched1: Fix -fcompare-debug issue in schedule_region [PR105586] > > In schedule_region(), a basic block that does not contain any real insns > is not scheduled and the dfa state at the entry of the bb is not copied > to the fallthru basic block. However a DEBUG insn is treated as a real > insn, and if a bb contains non-real insns and a DEBUG insn, it's dfa > state is copied to the fallthru bb. This was resulting in > -fcompare-debug failure as the incoming dfa state of the fallthru block > is different with -g. We should always copy the dfa state of a bb to > it's fallthru bb even if the bb does not contain real insns. > > 2022-08-22 Surya Kumari Jangala > > gcc/ > PR rtl-optimization/105586 > * sched-rgn.cc (schedule_region): Always copy dfa state to > fallthru block. > > gcc/testsuite/ > PR rtl-optimization/105586 > * gcc.target/powerpc/pr105586.c: New test. Interesting.    We may have stumbled over this bug internally a little while ago -- not from a compare-debug standpoint, but from a "why isn't the processor state copied to the fallthru block" point of view.   I had it on my to investigate list, but hadn't gotten around to it yet. I think there were requests for ChangeLog updates and a function comment for save_state_for_fallthru_edge.  OK with those updates. jeff