public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc(refs/users/meissner/heads/work068)] Avoid NaN and denormal values in XXSPLTIDP.
@ 2021-09-14 14:29 Michael Meissner
  0 siblings, 0 replies; only message in thread
From: Michael Meissner @ 2021-09-14 14:29 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:39dfb439be18b0b820f02dbe2c51999721ff58fc

commit 39dfb439be18b0b820f02dbe2c51999721ff58fc
Author: Michael Meissner <meissner@linux.ibm.com>
Date:   Tue Sep 14 10:29:25 2021 -0400

    Avoid NaN and denormal values in XXSPLTIDP.
    
    2021-09-14  Michael Meissner  <meissner@linux.ibm.com>
    
    gcc/
    
            * config/rs6000/predicates.md (easy_fp_constant_float_to_v2df):
            Avoid integer values that look like NaN or denormal values in
            XXSPLTIDP.

Diff:
---
 gcc/config/rs6000/predicates.md | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/gcc/config/rs6000/predicates.md b/gcc/config/rs6000/predicates.md
index c8f7d975b7c..635a08ec8d6 100644
--- a/gcc/config/rs6000/predicates.md
+++ b/gcc/config/rs6000/predicates.md
@@ -666,6 +666,11 @@
       HOST_WIDE_INT df_value = INTVAL (element);
       long df_words[2];
 
+      /* Stay away from NaNs and denormal values.  */
+      int exponent = (df_value >> 52) & 0x7ff;
+      if (exponent == 0 || exponent == 0x7ff)
+	return false;
+
       df_words[0] = (df_value >> 32) & 0xffffffff;
       df_words[1] = df_value & 0xffffffff;


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-09-14 14:29 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-14 14:29 [gcc(refs/users/meissner/heads/work068)] Avoid NaN and denormal values in XXSPLTIDP Michael Meissner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).