}
}
+ if ((inst->opcode != BRW_OPCODE_IF &&
+ inst->opcode != BRW_OPCODE_WHILE) &&
+ inst->dst.is_null() &&
+ !inst->has_side_effects() &&
+ !inst->writes_flag() &&
+ !inst->writes_accumulator) {
+ inst->opcode = BRW_OPCODE_NOP;
+ progress = true;
+ continue;
+ }
+
if (inst->dst.file == GRF) {
if (!inst->is_partial_write()) {
int var = live_intervals->var_from_reg(inst->dst);
if (inst->src[i].file == GRF) {
int var = live_intervals->var_from_reg(inst->src[i]);
- for (int j = 0; j < inst->regs_read(this, i); j++) {
+ for (int j = 0; j < inst->regs_read(i); j++) {
BITSET_SET(live, var + j);
}
}