vc4: Optimize out silly SUBs of 0.
Drops instructions on vs-temp-array-mat4-index-col-row-wr.shader_test, which I was looking at because it's failing to register allocate.
This commit is contained in:
@@ -117,6 +117,17 @@ qir_opt_algebraic(struct vc4_compile *c)
|
||||
}
|
||||
break;
|
||||
|
||||
case QOP_FSUB:
|
||||
case QOP_SUB:
|
||||
if (is_zero(c, defs, inst->src[1])) {
|
||||
dump_from(c, inst);
|
||||
inst->op = QOP_MOV;
|
||||
inst->src[1] = c->undef;
|
||||
progress = true;
|
||||
dump_to(c, inst);
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user