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] |
>> Is the problem in this case that the copied subreg is being inserted >> into the insn in two different places? > > This was fixed by the previous fix for the bug found by using > enable-checking=rtl. I am dropping the patch. The bug reappeared with another test (attached). The problem is on the lines of what you think it is. Before replace_rtx, ref_copy has the node "(reg:SI 62 [ a ])" in two places. After it, the subreg is present in those 2 places. I can see 3 options: 1) ref_copy was already invalid and we should no be sharing "(reg:SI 62 [ a ])" 2) replace_rtx should create copies of "to" when replacing in more then one place. 3) we have to fix ref_copy after replace_rtx. I like 1, but verify_rtx_sharing says REGs can be shared, so there might be a good reason for it. Changing replace_rtx sounds tempting, but I am afraid to break something else. The attached patch implements 3. 2008-05-26 Rafael Espindola <espindola@google.com> * see.c (see_def_extension_not_merged): Use copy_rtx to avoid invalid sharing. * gcc/testsuite/gcc.dg/20080526-1.c: New test. OK if bootstraps and tests are OK? Cheers, -- Rafael Avila de Espindola Google Ireland Ltd. Gordon House Barrow Street Dublin 4 Ireland Registered in Dublin, Ireland Registration Number: 368047
Attachment:
test.i
Description: Binary data
Attachment:
see-fix4.patch
Description: Binary data
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |