From patchwork Wed Sep 23 22:52:48 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joseph Myers X-Patchwork-Id: 521890 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org 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 ozlabs.org (Postfix) with ESMTPS id C58A01401DE for ; Thu, 24 Sep 2015 08:53:00 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.b=lXQ4FG2X; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:from:to:subject:message-id:mime-version :content-type; q=dns; s=default; b=Tll/LmfiQ7uiIY0L/CvdT+qHaid6a IP9UYnMnzCobSDrvCt1j07rHQANajBvupDmMRXDysmx7rVTf9jiH14+8gpheBiom 4COwdDBL3h0k8FdlGM3a80yIW5dn6+8Nh8EwcMFY8q6CHsNZYir6W/7JQw/6ItNq lYEhWURNMNdJbQ= 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:date:from:to:subject:message-id:mime-version :content-type; s=default; bh=7HQZhEgs1jes6U8ZVJ7RJ639AMU=; b=lXQ 4FG2XM+P3mbQSznd1LuZgy+1FMj0JZ9UtetLvZCRU2HwWu16SZyk5ghwlcwMFxLR hxvIMpQHkXeGEDINV0Is2UC6+qQIbZenLGiuSdxpG/YB+uoEkctuNBD5tDKHiKGn pOcRUpQHfWj4kLZ6LN8vK8SUSpmcyN2HyvsTdzHs= Received: (qmail 64147 invoked by alias); 23 Sep 2015 22:52:55 -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 Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 64134 invoked by uid 89); 23 Sep 2015 22:52:54 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.3 required=5.0 tests=AWL, BAYES_20, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 X-HELO: relay1.mentorg.com Date: Wed, 23 Sep 2015 22:52:48 +0000 From: Joseph Myers To: Subject: Don't use volatile in exp2f [committed] Message-ID: User-Agent: Alpine 2.10 (DEB 1266 2009-07-14) MIME-Version: 1.0 sysdeps/ieee754/flt-32/e_exp2f.c declares two variable as "static const volatile float". Maybe this use of "volatile" was originally intended to inhibit optimization of underflowing / overflowing operations such as TWOM100 * TWOM100; in any case, it's not currently needed, as given -frounding-math constant folding of such expressions is properly disabled when it would be unsafe. This patch removes the unnecessary use of "volatile". Tested for x86_64. Committed. 2015-09-23 Joseph Myers * sysdeps/ieee754/flt-32/e_exp2f.c (TWOM100): Remove volatile. (TWO127): Likewise. diff --git a/sysdeps/ieee754/flt-32/e_exp2f.c b/sysdeps/ieee754/flt-32/e_exp2f.c index d8e7a9c..c053340 100644 --- a/sysdeps/ieee754/flt-32/e_exp2f.c +++ b/sysdeps/ieee754/flt-32/e_exp2f.c @@ -37,8 +37,8 @@ #include "t_exp2f.h" -static const volatile float TWOM100 = 7.88860905e-31; -static const volatile float TWO127 = 1.7014118346e+38; +static const float TWOM100 = 7.88860905e-31; +static const float TWO127 = 1.7014118346e+38; float __ieee754_exp2f (float x)