summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2015-03-30 10:44:28 -0700
committerEric Anholt <[email protected]>2015-03-30 12:57:45 -0700
commit1dcc1ee314a6907213e2abd5337ec0bbba3bd1bf (patch)
treefdf9cb0e241771057263c3dd8e9a711c698f7d4e
parent8c5dcdbccb68b73d2856d9c1faafadc536e682e3 (diff)
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%)
-rw-r--r--src/gallium/drivers/vc4/vc4_opt_algebraic.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/gallium/drivers/vc4/vc4_opt_algebraic.c b/src/gallium/drivers/vc4/vc4_opt_algebraic.c
index d17669abaff..e40e0f3b71b 100644
--- a/src/gallium/drivers/vc4/vc4_opt_algebraic.c
+++ b/src/gallium/drivers/vc4/vc4_opt_algebraic.c
@@ -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)) {