[PATCH] Fix (?) load_kills_store

Zdenek Dvorak rakdver@atrey.karlin.mff.cuni.cz
Sun Jun 29 13:54:00 GMT 2003


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;
  }



More information about the Gcc-patches mailing list