From patchwork Fri May 13 14:42:42 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Andrew MacLeod X-Patchwork-Id: 1630775 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.a=rsa-sha256 header.s=default header.b=Z0EUBVq1; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Received: from sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4L0BGQ4jWNz9sFk for ; Sat, 14 May 2022 00:43:25 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id D0679396E06C for ; Fri, 13 May 2022 14:43:22 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D0679396E06C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1652453002; bh=QQl7OBj3Jlp8ReITcBitE0SnqdDzU7WRj4Ud0q0MC8o=; h=Date:To:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=Z0EUBVq1U09s9qIIB5zDbgJyiBEbA0NHnbFUStBC68SVj6FEevH7AeVs2bsiJEX5E iGsruYksRRqd6MOV/VpqqGih30WxoHEkL7YT3o0Wg6c8ftfrTvuoc0z+5z4H3514yn 7ceFolqzeSGtTdWsBn4PU5X21hgf/AnNtg5J6nq4= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id 1202F396E43A for ; Fri, 13 May 2022 14:42:48 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 1202F396E43A Received: from mail-qv1-f72.google.com (mail-qv1-f72.google.com [209.85.219.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-245-42LcOaQoO9uP60aVST0CCw-1; Fri, 13 May 2022 10:42:46 -0400 X-MC-Unique: 42LcOaQoO9uP60aVST0CCw-1 Received: by mail-qv1-f72.google.com with SMTP id n5-20020a0cbe85000000b0045aff56564bso7017108qvi.4 for ; Fri, 13 May 2022 07:42:46 -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 :content-language:to:cc:from:subject; bh=Yam8kNocq2RagbpLo3u3pZbxxVd8zZvC36pYKL92pDA=; b=Zq4J118+0KB0l3wwrPMcPJP89LMN9J02hWPnMsYSQtVwDOYiZxVJm9Sb/aBn8u0c2p 08YjmmhQ6ZI9iDSEn0u0v2YakIuwYSLkGvjB1ZzxqBR0e+gf0fLyrQu6qcs7T+wXEWbE ijcwI46F1ofoYrzPHrblOaVVkCWiZCxmKM2h+UeS8L9eyrK0zrOBq4AJFwQhaO5P7+ZH pYMgF7VZ98hvC+DOnuoJVTSlwbLZ+eVTomPlcUSaRPH8LUOQiCJApNAXlKwXdV0YhDJW EZYuB8MjNOGPgKcnzt1MKOJp6YoCkI4X3YDO2Vyqo0rN/oQ1dGl1FC9lLooMT0gkVsXg 2MkQ== X-Gm-Message-State: AOAM530r6WZImWrFG8yR3o12dPRaj5ONz4wdteHM8zbtqd4woz10OVnk I4L4Z2DYgVFlLAs6qrN/QNvn/JNZdB3fA7CAqXxzxplMWlowJlwNUUpjSjsANiageImHbKP5x32 uAkkcOvIXYR1Bvhmug22/eMqSLTHKtS8Z3f6Ar2oX76VAuoOuLItjhiQVsk6D8To6E8A3QQ== X-Received: by 2002:ac8:5cc9:0:b0:2f3:c52d:7289 with SMTP id s9-20020ac85cc9000000b002f3c52d7289mr4944259qta.522.1652452965552; Fri, 13 May 2022 07:42:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzj41PgXDjgZoU8KoXfZOfTgmKXdj9mYDkiJMKkdfqhJPKzA5Hoa9GyVjNTkerci81wotwb3g== X-Received: by 2002:ac8:5cc9:0:b0:2f3:c52d:7289 with SMTP id s9-20020ac85cc9000000b002f3c52d7289mr4944240qta.522.1652452965303; Fri, 13 May 2022 07:42:45 -0700 (PDT) Received: from ?IPV6:2607:fea8:a261:5e00::94b0? ([2607:fea8:a261:5e00::94b0]) by smtp.gmail.com with ESMTPSA id d19-20020a05620a167300b0069fc13ce250sm1430827qko.129.2022.05.13.07.42.43 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 13 May 2022 07:42:44 -0700 (PDT) Message-ID: <36ae8571-a1fa-8062-ab43-7141c7d2e934@redhat.com> Date: Fri, 13 May 2022 10:42:42 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.0 To: gcc-patches Subject: [COMMITTED] Fix return value in ranger_cache::get_global_range X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-CA X-Spam-Status: No, score=-12.9 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_LOW, SPF_HELO_NONE, SPF_NONE, 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-Patchwork-Original-From: Andrew MacLeod via Gcc-patches From: Andrew MacLeod Reply-To: Andrew MacLeod Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org Sender: "Gcc-patches" This fixes a buglet in get_global_range where it was not returning the correct value. It was returning whether the value was current, not whether it originally had a global value set as it was suppose to.  The current_p flag is returned as a parameter already. Bootstrapped on x86_64-pc-linux-gnu with no regressions.  Pushed. Andrew commit 98e475a8f58ca3ba6e9bd5c9276efce4236f5d26 Author: Andrew MacLeod Date: Fri Mar 18 11:50:33 2022 -0400 Fix return value in ranger_cache::get_global_range. The "is_current" status is returned by parameter, but was being returned by the function as well instead of true if NAME had a global range, and FALSE if it did not. * gimple-range-cache.cc (ranger_cache::get_global_range): Return the had_global value instead. diff --git a/gcc/gimple-range-cache.cc b/gcc/gimple-range-cache.cc index bdb30460345..d3cf8be9bd8 100644 --- a/gcc/gimple-range-cache.cc +++ b/gcc/gimple-range-cache.cc @@ -951,7 +951,7 @@ ranger_cache::get_global_range (irange &r, tree name, bool ¤t_p) // If the existing value was not current, mark it as always current. if (!current_p) m_temporal->set_always_current (name); - return current_p; + return had_global; } // Set the global range of NAME to R and give it a timestamp.