vc4: Drop integer multiplies with 0 to moves of 0.

This cleans up more instructions generated by uniform array indexing
multiplies.

total instructions in shared programs: 39989 -> 39961 (-0.07%)
instructions in affected programs:     896 -> 868 (-3.12%)
This commit is contained in:
Eric Anholt 2015-03-30 10:44:28 -07:00
parent 8c5dcdbccb
commit 1dcc1ee314
1 changed files with 8 additions and 0 deletions

View File

@ -248,6 +248,14 @@ qir_opt_algebraic(struct vc4_compile *c)
}
break;
case QOP_MUL24:
if (replace_x_0_with_0(c, inst, 0) ||
replace_x_0_with_0(c, inst, 1)) {
progress = true;
break;
}
break;
case QOP_AND:
if (replace_x_0_with_0(c, inst, 0) ||
replace_x_0_with_0(c, inst, 1)) {