[Beignet] [PATCH 4/4] GBE: a potential bug in instruction scheduling.

Zhigang Gong zhigang.gong at intel.com
Wed Aug 12 19:24:17 PDT 2015


ENDIF should be treated as barrier-like instruction
in instruction scheduling.

Signed-off-by: Zhigang Gong <zhigang.gong at intel.com>
---
 backend/src/backend/gen_insn_scheduling.cpp | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/backend/src/backend/gen_insn_scheduling.cpp b/backend/src/backend/gen_insn_scheduling.cpp
index b3b7042..5c55079 100644
--- a/backend/src/backend/gen_insn_scheduling.cpp
+++ b/backend/src/backend/gen_insn_scheduling.cpp
@@ -583,7 +583,10 @@ namespace gbe
     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 || node->insn.opcode == SEL_OP_IF || node->insn.opcode == SEL_OP_WHILE
+          || node->insn.opcode == SEL_OP_EOT
+          || node->insn.opcode == SEL_OP_IF
+          || node->insn.opcode == SEL_OP_ENDIF
+          || node->insn.opcode == SEL_OP_WHILE
           || node->insn.opcode == SEL_OP_READ_ARF
           || node->insn.opcode == SEL_OP_BARRIER)
         tracker.makeBarrier(insnID, insnNum);
-- 
1.9.1



More information about the Beignet mailing list