This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: optimization/9651: [Alpha] FPE with NAN in spite of isnan protection


Hi,

This patch marks fix expressions as trappable, preventing them from
being scheduled out of their block.

2003-02-11  Falk Hueffner  <falk.hueffner@student.uni-tuebingen.de>

        PR optimization/9651
	* rtlanal.c (may_trap_p): Handle FIX.

-- 
	Falk

Index: gcc/rtlanal.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/rtlanal.c,v
retrieving revision 1.145
diff -u -r1.145 rtlanal.c
--- gcc/rtlanal.c	17 Jan 2003 03:28:09 -0000	1.145
+++ gcc/rtlanal.c	11 Feb 2003 02:50:01 -0000
@@ -2517,6 +2517,12 @@
 	return 1;
       break;
 
+    case FIX:
+      /* Conversion of floating point might trap.  */
+      if (flag_trapping_math && HONOR_NANS (GET_MODE (XEXP (x, 0))))
+	return 1;
+      break;
+
     case NEG:
     case ABS:
       /* These operations don't trap even with floating point.  */

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]