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]

[PATCH] Fix (?) load_kills_store


Hello,

considering description of load_kills_store, it seems to me that
arguments to true_dependence are passed in reversed order, which
could cause problems when one of the mems is unchanging (actually
switching the order seems to fix a misscompilation with my dce of
mems patch).

Zdenek

Changelog:
	* gcse.c (load_kills_store): Pass arguments to true_dependence
	in correct order.

Index: gcse.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/gcse.c,v
retrieving revision 1.253
diff -c -3 -p -r1.253 gcse.c
*** gcse.c	28 Jun 2003 14:56:23 -0000	1.253
--- gcse.c	29 Jun 2003 13:18:19 -0000
*************** static bool
*** 7397,7403 ****
  load_kills_store (x, store_pattern)
       rtx x, store_pattern;
  {
!   if (true_dependence (x, GET_MODE (x), store_pattern, rtx_addr_varies_p))
      return true;
    return false;
  }
--- 7397,7404 ----
  load_kills_store (x, store_pattern)
       rtx x, store_pattern;
  {
!   if (true_dependence (store_pattern, GET_MODE (store_pattern), x,
! 		       rtx_addr_varies_p))
      return true;
    return false;
  }


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