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]

fix rtl-opt/21528 (boost shared_ptr_test)


Here's why 15,000 separate rtl walkers is a bad idea kids -- you
forget things occasionally.

The problem is that ASM_OPERAND doesn't have an 'e' operand, but
rather 'E' operands.  This caused us to miss overlap between a 
memory and an asm, which lead ifcvt to believe that it was safe
to combine two instances of an asm.

Tested on i686-linux.  Applying to mainline.  Mark, do I understand
correctly that this PR was on the critical list for 4.0.1?


r~


	* rtlanal.c (reg_overlap_mentioned_p) <MEM>: Handle 'E' formats.

Index: rtlanal.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/rtlanal.c,v
retrieving revision 1.211
diff -u -p -d -r1.211 rtlanal.c
--- rtlanal.c	24 Jan 2005 08:55:39 -0000	1.211
+++ rtlanal.c	7 Jun 2005 22:17:31 -0000
@@ -1309,8 +1309,18 @@ reg_overlap_mentioned_p (rtx x, rtx in)
 
 	fmt = GET_RTX_FORMAT (GET_CODE (in));
 	for (i = GET_RTX_LENGTH (GET_CODE (in)) - 1; i >= 0; i--)
-	  if (fmt[i] == 'e' && reg_overlap_mentioned_p (x, XEXP (in, i)))
-	    return 1;
+	  if (fmt[i] == 'e')
+	    {
+	      if (reg_overlap_mentioned_p (x, XEXP (in, i)))
+		return 1;
+	    }
+	  else if (fmt[i] == 'E')
+	    {
+	      int j;
+	      for (j = XVECLEN (in, i) - 1; j >= 0; --j)
+		if (reg_overlap_mentioned_p (x, XVECEXP (in, i, j)))
+		  return 1;
+	    }
 
 	return 0;
       }


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