From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS31976 209.132.180.0/23 X-Spam-Status: No, score=-3.9 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 635421F461 for ; Mon, 8 Jul 2019 15:37:54 +0000 (UTC) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:to:cc:references:from:subject:message-id:date :mime-version:in-reply-to:content-type :content-transfer-encoding; q=dns; s=default; b=vWWTT7xvCIWeJu25 tpl0WzTJju4ni9Gnc2g2Fv62JMlCYu95lNmhs3djyZ6JEpL8GECjiBC/87FR7Oif p1Qj45u8LxNHjq2cPlPifr2NNp6JQPXEgUpKW/59zYtMjaC5VBWs+xs5i0tjFWEp D3MOJvpbIJ28cEfufIehGJIxues= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:to:cc:references:from:subject:message-id:date :mime-version:in-reply-to:content-type :content-transfer-encoding; s=default; bh=cT3Ivyz4oVeKewuZbk+RWN VbLvI=; b=GTTSMi1F2ZiloNUpiCN8wQzwjoHESDIxmDL7vPpAgq406yO3VmHzfK M2b8b+j8OpeUIqg/gd1YoV/nYa9+Ytn7QSJHABEcQ0z5tpUZMtiioq9SuqLVjyc+ rfj5mAH51D4K2xUQB0IEuM8W75yflNuqFbKh2jS5SwKJFtBg+284s= Received: (qmail 44701 invoked by alias); 8 Jul 2019 15:37:40 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 44643 invoked by uid 89); 8 Jul 2019 15:37:40 -0000 Authentication-Results: sourceware.org; auth=none X-HELO: mail-qt1-f193.google.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=to:cc:references:from:openpgp:autocrypt:subject:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=XGlvvJzDDIkWqefDlDSmPHsIcnbVz4wY/lWDzEW+DOU=; b=zZMphQLpcrioHdUiprrPiSzCZIrKW8yq77y/rZ0SZPCeDNJTROfkeyFU8ordrRfNEH CH4eGm8/d1rg7IqXb+rqTDyC2snwjqKRkx0Zo3tq2XzXoVnoD75WLoWn5G68UuZ5wgnd Z+WfIvz0AkyvI9Cpvp9KxtQ0yAUF028jrlmEQJMYkx7PkSXp7lSb38DzEfpyGR3E+IP9 usa9sUUlacRgpGz3nq9bWqIAqqhdHKZJR23VMvCok3OtSxkjh24jnF1L6HcQGXRQQdq2 UQiVaKLN9LhAdGFlKDfEWyI5s/UOouCj5WBuh6wXejL7D2B5KetRcwuPy/g6ZK1Qzas4 o5yg== To: "Gabriel F. T. Gomes" Cc: libc-alpha@sourceware.org References: <20190329133529.22523-1-adhemerval.zanella@linaro.org> <20190329133529.22523-25-adhemerval.zanella@linaro.org> <20190626195925.kpvfzjk7kcjwb3mg@tereshkova> From: Adhemerval Zanella Openpgp: preference=signencrypt Subject: Re: [PATCH 24/28] powerpc: hypot refactor and optimization Message-ID: Date: Mon, 8 Jul 2019 12:37:29 -0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.2 MIME-Version: 1.0 In-Reply-To: <20190626195925.kpvfzjk7kcjwb3mg@tereshkova> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit On 26/06/2019 16:59, Gabriel F. T. Gomes wrote: > On Fri, Mar 29 2019, Adhemerval Zanella wrote: >> >> - Two reduntant checks (for y == 0 and y > two60factor && (x / y) > two60) > ~~~~~~ > I don't understand why y == 0 is redundant. It looks like an optimization > as much as the check for x > y * 0x1p+60. Should we actually remove the > check for y == 0? Indeed redundant is not the correct word, it is an optimization. I have reinstate it. > >> * sysdeps/powerpc/fpu/e_hypot.c (two60, two500, two600, two1022, >> twoM500, twoM600, two60factor, pdnum): Remove. >> (TEST_INFO_NAN): Remove macro. > > Missing mention to the removal of GET_TW0_HIGH_WORD? Ack. > >> - if (y == 0.0) >> - return x; > > As mentioned above, is it actually redundant? > >> + if (y <= 0x1.fffffffffffffp+963 && x > (y * 0x1p+60)) >> + return x + y; > > OK. Will not overflow. > > Other than that the patch looks good to me. > > Reviewed-by: Gabriel F. T. Gomes >