Simple ifcvt patch

Jan Hubicka hubicka@atrey.karlin.mff.cuni.cz
Tue May 2 07:30:00 GMT 2000


Hi
Is there something wrong about this change? :)

Honza

Tue May  2 16:28:57 MET DST 2000  Jan Hubicka  <jh@suse.cz>
	* ifcvt.c (noce_try_cmove_arith):  Use may_trap_p to thest
	whether address may trap.

Index: egcs/gcc/ifcvt.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/ifcvt.c,v
retrieving revision 1.7
diff -c -3 -p -r1.7 ifcvt.c
*** ifcvt.c	2000/05/02 06:35:22	1.7
--- ifcvt.c	2000/05/02 14:28:36
*************** noce_try_cmove_arith (if_info)
*** 842,851 ****
        is_mem = 1;
      }
  
!   /* ??? 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
!      from the address along the path from ENTRY.  */
!   else if (GET_CODE (a) == MEM || GET_CODE (b) == MEM)
      return FALSE;
  
    /* if (test) x = a + b; else x = c - d;
--- 842,848 ----
        is_mem = 1;
      }
  
!   else if (may_trap_p (a) || may_trap_p (b))
      return FALSE;
  
    /* if (test) x = a + b; else x = c - d;


More information about the Gcc-patches mailing list