This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
the failure in store motion
- To: dan at cgsoftware dot com, gcc at gcc dot gnu dot org
- Subject: the failure in store motion
- From: Jan Hubicka <jh at suse dot cz>
- Date: Mon, 6 Aug 2001 12:59:06 +0200
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;