From patchwork Thu Nov 26 08:27:58 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Saraswati, Sujoy (OSTL)" X-Patchwork-Id: 548966 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 625521402CD for ; Thu, 26 Nov 2015 19:28:43 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=lbLVxncK; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:date:message-id:content-type :content-transfer-encoding:mime-version; q=dns; s=default; b=kod ppgD71tH4Zf8fVW6qe72QtZ8SdZcc6nZ2hDE+VrhGWnzN5tw50e4TrpBe2oH7Ev1 Mf+PuHU0zm0XkE/KcWoAdjFzfMmjF0/1llJOuIkstiI0jnAy/WbPbsWAPPpYHbml TtILY04+HrM3hjxCqLhkENACbg9u8fxcNuyGwRyk= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:date:message-id:content-type :content-transfer-encoding:mime-version; s=default; bh=BFzelXlv8 66LAoeLX/GXs5exykk=; b=lbLVxncKtCsGGRs1XzPDm+eT/8wDkfpMu76Ncf7wd 3M/Voz9+AAaCZZTrppeV/ACWJLz0cGSE6iihFmXo0svF2qKQyZW22Uh2H49FxaOf i+Ft9qjmDPAZi0/juhH33Cg/I70y8bTDpCpV1/09hIhsgiQzbWzzWjB4ESiT+YMX SI= Received: (qmail 83554 invoked by alias); 26 Nov 2015 08:28:36 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 83537 invoked by uid 89); 26 Nov 2015 08:28:36 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.8 required=5.0 tests=AWL, BAYES_50, KAM_ASCII_DIVIDERS, KAM_LAZY_DOMAIN_SECURITY autolearn=no version=3.3.2 X-HELO: g9t5008.houston.hp.com Received: from g9t5008.houston.hp.com (HELO g9t5008.houston.hp.com) (15.240.92.66) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Thu, 26 Nov 2015 08:28:35 +0000 Received: from G4W6310.americas.hpqcorp.net (g4w6310.houston.hp.com [16.210.26.217]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by g9t5008.houston.hp.com (Postfix) with ESMTPS id 6A40DAA; Thu, 26 Nov 2015 08:28:33 +0000 (UTC) Received: from G4W6306.americas.hpqcorp.net (16.210.26.231) by G4W6310.americas.hpqcorp.net (16.210.26.217) with Microsoft SMTP Server (TLS) id 14.3.169.1; Thu, 26 Nov 2015 08:27:59 +0000 Received: from G4W3297.americas.hpqcorp.net ([169.254.11.80]) by G4W6306.americas.hpqcorp.net ([16.210.26.231]) with mapi id 14.03.0169.001; Thu, 26 Nov 2015 08:27:59 +0000 From: "Saraswati, Sujoy (OSTL)" To: Joseph Myers , Sujoy Saraswati , GCC Patches CC: Richard Biener Subject: Fix 61441 [ 1/5] Add REAL_VALUE_ISSIGNALING_NAN Date: Thu, 26 Nov 2015 08:27:58 +0000 Message-ID: <5379BA8D7E9D7E4D87BF6749A92854C248FC90A4@G4W3297.americas.hpqcorp.net> MIME-Version: 1.0 Hi, This series of patches fixes PR61441. The fix is broken into 5 patches. The first one adds REAL_VALUE_ISSIGNALING_NAN. 2015-11-26 Sujoy Saraswati PR tree-optimization/61441 * real.c (real_issignaling_nan): New. * real.h (real_issignaling_nan, REAL_VALUE_ISSIGNALING_NAN): New. Index: gcc/real.c =================================================================== --- gcc/real.c (revision 230851) +++ gcc/real.c (working copy) @@ -1195,6 +1195,13 @@ real_isnan (const REAL_VALUE_TYPE *r) return (r->cl == rvc_nan); } +/* Determine whether a floating-point value X is a signalling NaN. */ +bool +real_issignaling_nan (const REAL_VALUE_TYPE *r) +{ + return real_isnan (r) && r->signalling; +} + /* Determine whether a floating-point value X is finite. */ bool Index: gcc/real.h =================================================================== --- gcc/real.h (revision 230851) +++ gcc/real.h (working copy) @@ -262,6 +262,9 @@ extern bool real_isinf (const REAL_VALUE_TYPE *); /* Determine whether a floating-point value X is a NaN. */ extern bool real_isnan (const REAL_VALUE_TYPE *); +/* Determine whether a floating-point value X is a signalling NaN. */ +extern bool real_issignaling_nan (const REAL_VALUE_TYPE *); + /* Determine whether a floating-point value X is finite. */ extern bool real_isfinite (const REAL_VALUE_TYPE *); @@ -357,6 +360,9 @@ extern const struct real_format arm_half_format; /* Determine whether a floating-point value X is a NaN. */ #define REAL_VALUE_ISNAN(x) real_isnan (&(x)) +/* Determine whether a floating-point value X is a signalling NaN. */ +#define REAL_VALUE_ISSIGNALING_NAN(x) real_issignaling_nan (&(x)) + /* Determine whether a floating-point value X is negative. */ #define REAL_VALUE_NEGATIVE(x) real_isneg (&(x))