From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ej1-x62d.google.com (mail-ej1-x62d.google.com [IPv6:2a00:1450:4864:20::62d]) by sourceware.org (Postfix) with ESMTPS id 65F91382B3E8 for ; Wed, 14 Dec 2022 18:47:02 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 65F91382B3E8 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-ej1-x62d.google.com with SMTP id t17so46777308eju.1 for ; Wed, 14 Dec 2022 10:47:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=to:in-reply-to:cc:references:message-id:date:subject:mime-version :from:content-transfer-encoding:from:to:cc:subject:date:message-id :reply-to; bh=h/e6jWIHGQShMYc9RqLigFQlmJB02nx1L9Dzf3YLLK4=; b=TQ1LyInk3PR2yfEjb9YwZu/PChQPBH9Ze7aj8LQaIDZBIm+plLxcxY3kI67/G6ajR7 ZuCS9vyBitV0wrtGYk0tA/XGA3ERogao8xxLVaLfavmoh3+lZQ5SaQBj8+KE78ZdFXxD JgLCwBC0tEuM6qHC3xNDbVgIFzlek3x6EnVlpDU7/gQuZWM5V3c9IPcckr4f2qWPCacw 3JCxUuZJ55E+20gs/oScB9uD6s4HdcbprDUsrWz+mo56dGJ9q9WT6RrKI/0ls4p7lzgU 8KzSStxEs4mc2uUymHl7bwBG1TdD2/NoPyGTQ7foH16UuBfZmtFsi4EXJmce91t9Omjh yaEw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:in-reply-to:cc:references:message-id:date:subject:mime-version :from:content-transfer-encoding:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=h/e6jWIHGQShMYc9RqLigFQlmJB02nx1L9Dzf3YLLK4=; b=FAxJCMjEZXRLx1sbGc3Tjzv6cpEEDZ0Q3r6gVmJhfGyJFEs7tvf5aYBcZ6mKEZ4IBM AYxfrh60RR5b8nBRt20fRXWBmzDbpgHmMz8ExePLVvLUEykvmxnlP9DZvAwYwJsXwnau 3b0U7iHYZnXYvMPoan/mXgfMN4UHj9jzHALdsiwgcvdrP4VF3uow5UF9SB5fygux/bfO 3NInFrJwvwMlgIUR6+a5ltxy3XNgualq2qlBOv2+c37oKueR7wQqR06nCheCFAySXlEh 7+2I2toTCDkoNVLHsecX68RNUP/Shxp3t0FwsE6qakQV0JkYp7Qbrw9ddCOSLoB5QZPB PWNg== X-Gm-Message-State: ANoB5pl5bFej4JG9dTnnSmjfOTyzssjqyP4WLVAvPD+V3+IHzAI6UOYh ES/qbnJzHxKBVrrCshiMTHQ= X-Google-Smtp-Source: AA0mqf6/2fdXGFuOPQviFYWv5DjTpDvNsZWnbIPg+JXpFoR+l75rUVU9c5uEFjcKGOW/sPKBzeh+9w== X-Received: by 2002:a17:906:3702:b0:7ad:a797:5bbb with SMTP id d2-20020a170906370200b007ada7975bbbmr19967409ejc.63.1671043621191; Wed, 14 Dec 2022 10:47:01 -0800 (PST) Received: from smtpclient.apple ([2a02:3038:208:fe1a:e1da:6169:6ee4:271f]) by smtp.gmail.com with ESMTPSA id i6-20020a1709063c4600b007be696512ecsm6072655ejg.187.2022.12.14.10.47.00 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 14 Dec 2022 10:47:00 -0800 (PST) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable From: Richard Biener Mime-Version: 1.0 (1.0) Subject: Re: Possible dead code in file lra-spills.cc Date: Wed, 14 Dec 2022 19:46:48 +0100 Message-Id: References: Cc: gcc@gcc.gnu.org In-Reply-To: To: "G.T." X-Mailer: iPhone Mail (20C65) X-Spam-Status: No, score=-3.0 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,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 List-Id: > Am 14.12.2022 um 18:28 schrieb G.T. via Gcc : >=20 > =EF=BB=BFAt line 276, lra_assert (spill_class !=3D NO_REGS); would trigger= > whenever execution reached here with spill_class equal to NO_REGS. > Seems to me that would never happen. Because one of the conditions in > the if statement right above it (line 265) catches spill_class =3D=3D > NO_REGS and causes the rest of the for loop to be skipped by executing > continue in the consequent of the if. So lra_assert never sees > spill_class =3D=3D NO_REGS. That makes line 276 dead code, right? Sometimes this serves as documentation to make the code more obvious to read= . Depends on the distance of the redundant check. Richard=20 > Thanks. > GT.