The instuction has modFlag 1 indicating it will modify the flag.
Signed-off-by: Zhigang Gong <[email protected]>
---
backend/src/backend/gen_insn_scheduling.cpp | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/backend/src/backend/gen_insn_scheduling.cpp
b/backend/src/backend/gen_insn_scheduling.cpp
index a711f45..c3c4728 100644
--- a/backend/src/backend/gen_insn_scheduling.cpp
+++ b/backend/src/backend/gen_insn_scheduling.cpp
@@ -338,7 +338,7 @@ namespace gbe
}
// Track writes in predicates
- if (insn.opcode == SEL_OP_CMP || insn.opcode == SEL_OP_I64CMP) {
+ if (insn.opcode == SEL_OP_CMP || insn.opcode == SEL_OP_I64CMP ||
insn.state.modFlag) {
const uint32_t index = this->getIndex(getFlag(insn));
this->nodes[index] = node;
}
@@ -460,7 +460,7 @@ namespace gbe
tracker.addDependency(node, insn.dst(dstID));
// write-after-write for predicate
- if (insn.opcode == SEL_OP_CMP || insn.opcode == SEL_OP_I64CMP)
+ if (insn.opcode == SEL_OP_CMP || insn.opcode == SEL_OP_I64CMP ||
insn.state.modFlag)
tracker.addDependency(node, getFlag(insn));
// write-after-write for accumulators
@@ -530,7 +530,7 @@ namespace gbe
// Make labels and branches non-schedulable (i.e. they act as barriers)
for (int32_t insnID = 0; insnID < insnNum; ++insnID) {
ScheduleDAGNode *node = tracker.insnNodes[insnID];
- if (node->insn.isBranch() || node->insn.isLabel() || node->insn.opcode
== SEL_OP_EOT)
+ if (node->insn.isBranch() || node->insn.isLabel() || node->insn.opcode
== SEL_OP_EOT || node->insn.opcode == SEL_OP_IF)
tracker.makeBarrier(insnID, insnNum);
}
--
1.8.3.2
_______________________________________________
Beignet mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/beignet