R600: Add support for GROUP_BARRIER instruction
[oota-llvm.git] / lib / Target / R600 / R600EmitClauseMarkers.cpp
index ff5ce5a2dd769c135ea366ee06e14ad18d0fbb63..0aea2d7c030679ec25c52be44b6741ff3efe75f8 100644 (file)
@@ -177,7 +177,14 @@ private:
         AluInstCount ++;
         continue;
       }
-      if (I->getOpcode() == AMDGPU::KILLGT) {
+      // XXX: GROUP_BARRIER instructions cannot be in the same ALU clause as:
+      //
+      // * KILL or INTERP instructions
+      // * Any instruction that sets UPDATE_EXEC_MASK or UPDATE_PRED bits
+      // * Uses waterfalling (i.e. INDEX_MODE = AR.X)
+      //
+      // XXX: These checks have not been implemented yet.
+      if (TII->mustBeLastInClause(I->getOpcode())) {
         I++;
         break;
       }