ifcvt.c (noce_try_cmove_arith): Use may_trap_p to thest whether address may trap.
authorJan Hubicka <jh@suse.cz>
Wed, 3 May 2000 11:16:35 +0000 (11:16 +0000)
committerJan Hubicka <hubicka@gcc.gnu.org>
Wed, 3 May 2000 11:16:35 +0000 (11:16 +0000)
* ifcvt.c (noce_try_cmove_arith):  Use may_trap_p to thest
whether address may trap.

From-SVN: r33627

gcc/ChangeLog
gcc/ifcvt.c
gcc/timevar.c

index 1c35a686f6a70e75146afee42847609966362975..a7ec6b80a2ecc8d54149b258af6fb103fcf9cc15 100644 (file)
@@ -1,3 +1,8 @@
+Wed May  3 13:14:49 MET DST 2000  Jan Hubicka  <jh@suse.cz>
+
+       * ifcvt.c (noce_try_cmove_arith):  Use may_trap_p to thest
+       whether address may trap.
+
 Tue May  2 23:38:37 2000  Jason Eckhardt  <jle@cygnus.com>
 
         * bb-reorder (chain_reorder_blocks): Changed code to test for
index c1fc951a059e059da73e1f967ac4f7cacad3c3d0..7595fcbeb66d512a5e83e3d841a82ac5a9b521e8 100644 (file)
@@ -843,9 +843,9 @@ noce_try_cmove_arith (if_info)
     }
 
   /* ??? We could handle this if we knew that a load from A or B could
-     not fault.  This is true of stack memories or if we've already loaded
+     not fault.  This is also true if we've already loaded
      from the address along the path from ENTRY.  */
-  else if (GET_CODE (a) == MEM || GET_CODE (b) == MEM)
+  else if (may_trap_p (a) || may_trap_p (b))
     return FALSE;
 
   /* if (test) x = a + b; else x = c - d;
index 756365bad5aa4e5e256604a37dd42b079bbb61a5..a9a5c5e1dbe199c3d752268babb6f89cede5e29f 100644 (file)
@@ -21,6 +21,7 @@
 
 #include "config.h"
 #include "system.h"
+#include <sys/resource.h>
 
 #ifdef HAVE_SYS_TIMES_H
 # include <sys/times.h>