web ICEs on subreg

Submitted by Mike Stump on May 14, 2013, 6:20 p.m.

Details

Message ID B298679F-6415-410B-BA3B-506B42106B0B@comcast.net
State New
Headers show

Commit Message

Mike Stump May 14, 2013, 6:20 p.m.
On May 10, 2013, at 5:27 PM, Kenneth Zadeck <zadeck@naturalbridge.com> wrote:
> Assuming the patch has been tested on a public port, it is ok for commit.

Thanks.  It turns out that my patch is necessary, but not sufficient, the code that exists must be left in place, as there are pre-existing test cases in the test suite that do depend upon the existing code.  In the below code, I leave the existing code alone, and merely add the additional code.  I reviewed the way the code gets here, and reasonably it can get here in either of the two ways, so having two checks is required.

Here is the version I checked in.
2013-05-14  Mike Stump  <mikestump@comcast.net>

	* web.c (union_match_dups): Also check DF_REF_REAL_LOC.

--------------

Patch hide | download patch | download mbox

Index: web.c
===================================================================
--- web.c	(revision 198796)
+++ web.c	(working copy)
@@ -132,14 +132,22 @@  union_match_dups (rtx insn, struct web_e
       ref = type == OP_IN ? use_link : def_link;
       entry = type == OP_IN ? use_entry : def_entry;
       for (; *ref; ref++)
-	if (DF_REF_LOC (*ref) == recog_data.operand_loc[op])
-	  break;
+	{
+	  if (DF_REF_LOC (*ref) == recog_data.operand_loc[op])
+	    break;
+	  if (DF_REF_REAL_LOC (*ref) == recog_data.operand_loc[op])
+	    break;
+	}
 
       if (!*ref && type == OP_INOUT)
 	{
 	  for (ref = use_link, entry = use_entry; *ref; ref++)
-	    if (DF_REF_LOC (*ref) == recog_data.operand_loc[op])
-	      break;
+	    {
+	      if (DF_REF_LOC (*ref) == recog_data.operand_loc[op])
+		break;
+	      if (DF_REF_REAL_LOC (*ref) == recog_data.operand_loc[op])
+		break;
+	    }
 	}
 
       gcc_assert (*ref);