summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Wilson <wilson@redhat.com>2001-10-02 05:00:19 +0000
committerJim Wilson <wilson@gcc.gnu.org>2001-10-01 22:00:19 -0700
commit357e3f3d83e1087d5fa239dddcb1ceb1e9b775ac (patch)
tree742d4d746e3b8b6b4d1c60bd7f08b7f9ce1014c1
parented947a968eb7b1de0557448c7128d25a2b9bf40c (diff)
downloadgcc-357e3f3d83e1087d5fa239dddcb1ceb1e9b775ac.tar.gz
Fix ia64 scheduler/predicated insn bug report from SAP.
* sched-deps.c (add_dependence): When elide conditional dependence, check that insn doesn't modify cond2. From-SVN: r45938
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/sched-deps.c7
2 files changed, 11 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index e0581ec4f24..b75dfe63132 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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
diff --git a/gcc/sched-deps.c b/gcc/sched-deps.c
index 0142221c5e6..abb02c439ab 100644
--- a/gcc/sched-deps.c
+++ b/gcc/sched-deps.c
@@ -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;
}