summaryrefslogtreecommitdiff
path: root/gcc/config/gcn/gcn.cc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/config/gcn/gcn.cc')
-rw-r--r--gcc/config/gcn/gcn.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/config/gcn/gcn.cc b/gcc/config/gcn/gcn.cc
index 10f740578c4..a2d852187bf 100644
--- a/gcc/config/gcn/gcn.cc
+++ b/gcc/config/gcn/gcn.cc
@@ -5887,6 +5887,7 @@ gcn_md_reorg (void)
attr_type itype = get_attr_type (insn);
attr_unit iunit = get_attr_unit (insn);
attr_delayeduse idelayeduse = get_attr_delayeduse (insn);
+ int ivccwait = get_attr_vccwait (insn);
HARD_REG_SET ireads, iwrites;
CLEAR_HARD_REG_SET (ireads);
CLEAR_HARD_REG_SET (iwrites);
@@ -5964,6 +5965,14 @@ gcn_md_reorg (void)
&& ((hard_reg_set_intersect_p
(prev_insn->reads, iwrites))))
nops_rqd = 1 - prev_insn->age;
+
+ /* Instruction that requires VCC is not written too close before
+ using it. */
+ if (prev_insn->age < ivccwait
+ && (hard_reg_set_intersect_p
+ (prev_insn->writes,
+ reg_class_contents[(int)VCC_CONDITIONAL_REG])))
+ nops_rqd = ivccwait - prev_insn->age;
}
/* Insert the required number of NOPs. */