This is the mail archive of the gcc@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]

the failure in store motion


Hi,
looking at the failure, it seems to me that it is due to bug in 
store_killed_in_insn_p.
It is wrong, as mentioned by Graham for pure insns, but on the i386
even for const calls, as the arguments are passed on the stack.

You must check the function ussage to kill the stores completely

Like this:

Index: gcse.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/gcse.c,v
retrieving revision 1.144
diff -c -3 -p -r1.144 gcse.c
*** gcse.c	2001/08/04 06:07:59	1.144
--- gcse.c	2001/08/06 10:58:07
*************** store_killed_in_insn (x, insn)
*** 6513,6519 ****
    
    if (GET_CODE (insn) == CALL_INSN)
      {
!       if (CONST_CALL_P (insn))
  	return 0;
        else
  	return 1;
--- 6512,6519 ----
    
    if (GET_CODE (insn) == CALL_INSN)
      {
!       if (CONST_CALL_P (insn)
! 	  && !find_loads (CALL_INSN_FUNCTION_USAGE (insn)))
  	return 0;
        else
  	return 1;


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