Fix ia64 scheduler/predicated insn bug report from SAP.
authorJim Wilson <wilson@redhat.com>
Tue, 2 Oct 2001 05:00:19 +0000 (05:00 +0000)
committerJim Wilson <wilson@gcc.gnu.org>
Tue, 2 Oct 2001 05:00:19 +0000 (22:00 -0700)
* sched-deps.c (add_dependence): When elide conditional dependence,
check that insn doesn't modify cond2.

From-SVN: r45938

gcc/ChangeLog
gcc/sched-deps.c

index e0581ec4f249073536897e7141946d5772f5cc21..b75dfe631327f6dd37de475bd9e027d906206834 100644 (file)
@@ -1,3 +1,8 @@
+2001-10-01  Jim Wilson  <wilson@redhat.com>
+
+       * sched-deps.c (add_dependence): When elide conditional dependence,
+       check that insn doesn't modify cond2.
+
 2001-10-01  Dale Johannesen  <dalej@apple.com>
 
        * config/rs6000/rs6000.h (enum processor_type): Add support
index 0142221c5e6661ae4623303e7f93aef242ce5dab..abb02c439abddda8be52a4a7a83ef96cbac174fd 100644 (file)
@@ -222,7 +222,12 @@ add_dependence (insn, elem, dep_type)
       cond2 = get_condition (elem);
       if (cond1 && cond2
          && conditions_mutex_p (cond1, cond2)
-         && !modified_in_p (cond1, elem))
+         /* Make sure first instruction doesn't affect condition of second
+            instruction if switched.  */
+         && !modified_in_p (cond1, elem)
+         /* Make sure second instruction doesn't affect condition of first
+            instruction if switched.  */
+         && !modified_in_p (cond2, insn))
        return;
     }