if (instr->format == Format::EXP)
return false;
+ /* don't move s_memtime/s_memrealtime */
+ if (instr->opcode == aco_opcode::s_memtime || instr->opcode == aco_opcode::s_memrealtime)
+ return false;
+
/* handle barriers */
/* TODO: instead of stopping, maybe try to move the barriers and any
int16_t k = 0;
bool can_reorder_cur = can_reorder(current, false);
+ /* don't move s_memtime/s_memrealtime */
+ if (current->opcode == aco_opcode::s_memtime || current->opcode == aco_opcode::s_memrealtime)
+ return;
+
/* create the initial set of values which current depends on */
std::fill(ctx.depends_on.begin(), ctx.depends_on.end(), false);
for (const Operand& op : current->operands) {