intel/eu: Plumb header present bit to codegen helpers for HDC messages.
[mesa.git] / src / intel / compiler / brw_fs_sel_peephole.cpp
index 4c1c16079782b0a201fd742cf82595558a27e17d..fd02792bebcaddb1b301b2cf6496f688035f0791 100644 (file)
@@ -68,7 +68,8 @@ count_movs_from_if(fs_inst *then_mov[MAX_MOVS], fs_inst *else_mov[MAX_MOVS],
 {
    int then_movs = 0;
    foreach_inst_in_block(fs_inst, inst, then_block) {
-      if (then_movs == MAX_MOVS || inst->opcode != BRW_OPCODE_MOV)
+      if (then_movs == MAX_MOVS || inst->opcode != BRW_OPCODE_MOV ||
+          inst->flags_written())
          break;
 
       then_mov[then_movs] = inst;
@@ -77,7 +78,8 @@ count_movs_from_if(fs_inst *then_mov[MAX_MOVS], fs_inst *else_mov[MAX_MOVS],
 
    int else_movs = 0;
    foreach_inst_in_block(fs_inst, inst, else_block) {
-      if (else_movs == MAX_MOVS || inst->opcode != BRW_OPCODE_MOV)
+      if (else_movs == MAX_MOVS || inst->opcode != BRW_OPCODE_MOV ||
+          inst->flags_written())
          break;
 
       else_mov[else_movs] = inst;
@@ -165,8 +167,6 @@ fs_visitor::opt_peephole_sel()
              then_mov[i]->exec_size != else_mov[i]->exec_size ||
              then_mov[i]->group != else_mov[i]->group ||
              then_mov[i]->force_writemask_all != else_mov[i]->force_writemask_all ||
-             then_mov[i]->dst.type != then_mov[i]->src[0].type ||
-             else_mov[i]->dst.type != else_mov[i]->src[0].type ||
              then_mov[i]->is_partial_write() ||
              else_mov[i]->is_partial_write() ||
              then_mov[i]->conditional_mod != BRW_CONDITIONAL_NONE ||