This is the mail archive of the gcc-bugs@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]

[Bug rtl-optimization/52573] [4.6/4.7/4.8 regression] regrename creates overlapping register allocations for output operands


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52573

--- Comment #6 from Alexandre Oliva <aoliva at gcc dot gnu.org> 2012-12-07 11:16:55 UTC ---
I don't get the invalid insn in the trunk, in spite of still having both REG
%d2 notes on it before rnreg.

My attempts to avoid the REG_DEAD note were unfruitful (reg-stack wasn't happy
with my moving the REG_UNUSED note emission out of the CLOBBER conditional on
CALLs, nor with my attempt to mark clobbers as do_not_gen in non-calls,but I
didn't try to find out why yet), but this one, that makes behavior consistent
for calls and non-calls, seems to at least complete the stage1 libgcc build. 
However, rather than removing the bogus REG_DEAD note, it drops the REG_UNUSED
one.

--- a/gcc/df-problems.c
+++ b/gcc/df-problems.c
@@ -3277,11 +3277,12 @@ df_note_bb_compute (unsigned int bb_index,
         {
           df_ref def = *def_rec;
           unsigned int dregno = DF_REF_REGNO (def);
-          df_create_unused_note (insn,
-                     def, live, artificial_uses, &debug);
-
           if (!DF_REF_FLAGS_IS_SET (def, DF_REF_MUST_CLOBBER |
DF_REF_MAY_CLOBBER))
-        bitmap_set_bit (do_not_gen, dregno);
+        {
+          df_create_unused_note (insn,
+                     def, live, artificial_uses, &debug);
+          bitmap_set_bit (do_not_gen, dregno);
+        }

           if (!DF_REF_FLAGS_IS_SET (def, DF_REF_PARTIAL | DF_REF_CONDITIONAL))
         bitmap_clear_bit (live, dregno);


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