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 9D8221F461 for ; Mon, 8 Jul 2019 18:30:50 +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:subject:from:to:cc:references:message-id:date :mime-version:in-reply-to:content-type :content-transfer-encoding; q=dns; s=default; b=GkU+gcsQp1XlOi84 cOaRcHQMYRHE6ExFGTEhHoMfS3W9fF1qzPkvdNfAUd95smdbTvrqAPlNl9cjRWYl FBtJp6l5mR/kbUI84x6W+204/4YLjbFXaePo3CepR6qX6V0lmKDAKVpLRoiBq7Eg ayHTQ0/h/7zdtjm2GdeGZBn3cwU= 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:subject:from:to:cc:references:message-id:date :mime-version:in-reply-to:content-type :content-transfer-encoding; s=default; bh=Thuqe1qzfEJBIkI9BNe2QM 5IM/8=; b=ljcb3OLKvyysMdVlYgSJJibg1sB+Lq+ofYsDwx2cgRQ/So58bMcZXe 6fZEBQ0DnTHdyftlnpgCBDXalrVwtlnfBZkeUOIeEPTCHVBZL+YD88S1XjKtE05v I3T6S0KRyr6TYJg56U9V/HkCCAeVlIDBUFBJEpMYHMxT7FEeDRiHM= Received: (qmail 83415 invoked by alias); 8 Jul 2019 18:30:48 -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 83392 invoked by uid 89); 8 Jul 2019 18:30:47 -0000 Authentication-Results: sourceware.org; auth=none X-HELO: mail-qk1-f194.google.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=subject:from:to:cc:references:openpgp:autocrypt:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=UpJ3EvVwhy5ambZAaJ10pLgtf3rjhRCZt4f8P1v3Yk0=; b=Dnf7h0X35q9HrfZQfBQVfwuCMAeuYgzKrodLzLnFCwU78ObRdoTyh5w8mX4msH87r8 BOf8cPgyO4+mQFirr03TCuvzHrNxfJaAmMybRU1g13vCzyRFij8WjLryEoBllja1PJz1 Xms9gk35Kh+DvY3n0LYt6f2al2FX2AdC4qEYobDwPoE+jyrCImCaOW6eI9C4h60ZwHtz nyZbhSWcwz0v9C3wwaFeUgjQ9iENZKgWZbZja8GrPe3S5z9ncJO7BGz0FuRG3lIJ8nDC vlRLujzi4q3wsdpjx171Yjq7j83DzdQbgTFvb8j55joAQfxYmLC+PByjnDKIKfQDdZWv SkjQ== Subject: Re: [PATCH 24/28] powerpc: hypot refactor and optimization From: Adhemerval Zanella 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> Openpgp: preference=signencrypt Message-ID: Date: Mon, 8 Jul 2019 15:30:40 -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: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit On 08/07/2019 12:37, Adhemerval Zanella wrote: > > > 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 >> If no one opposes it, I will commit this shortly.