sel-sched-ir.c (has_dependence_note_reg_use): Call ds_full_merge only if producer...
authorSergey Grechanik <mouseentity@ispras.ru>
Thu, 11 Aug 2011 11:55:11 +0000 (11:55 +0000)
committerAlexander Monakov <amonakov@gcc.gnu.org>
Thu, 11 Aug 2011 11:55:11 +0000 (15:55 +0400)
2011-08-11  Sergey Grechanik  <mouseentity@ispras.ru>

* sel-sched-ir.c (has_dependence_note_reg_use): Call ds_full_merge
only if producer writes to the register given by regno.

From-SVN: r177658

gcc/ChangeLog
gcc/sel-sched-ir.c

index 0ea71d9693208853a96c9a2261d5ba432432acf1..97a16649d0e9c4bf8a531f132fc61ed73936886c 100644 (file)
@@ -1,3 +1,8 @@
+2011-08-11  Sergey Grechanik  <mouseentity@ispras.ru>
+
+       * sel-sched-ir.c (has_dependence_note_reg_use): Call ds_full_merge
+       only if producer writes to the register given by regno.
+
 2011-08-11  Sergey Grechanik  <mouseentity@ispras.ru>
            Alexander Monakov  <amonakov@ispras.ru>
 
index c7e365a9904b151cb68a99b7dd92faab09a43ffc..4878460f8824a089d0d834c747787e01834e0611 100644 (file)
@@ -3227,7 +3227,8 @@ has_dependence_note_reg_use (int regno)
          pro_spec_checked_ds = INSN_SPEC_CHECKED_DS (has_dependence_data.pro);
          pro_spec_checked_ds = ds_get_max_dep_weak (pro_spec_checked_ds);
 
-         if (pro_spec_checked_ds != 0)
+         if (pro_spec_checked_ds != 0
+             && bitmap_bit_p (INSN_REG_SETS (has_dependence_data.pro), regno))
            /* Merge BE_IN_SPEC bits into *DSP.  */
            *dsp = ds_full_merge (*dsp, pro_spec_checked_ds,
                                  NULL_RTX, NULL_RTX);