Mesa (master): vc4: Drop integer multiplies with 0 to moves of 0.
Eric Anholt
anholt at kemper.freedesktop.org
Mon Mar 30 20:03:26 UTC 2015
Module: Mesa
Branch: master
Commit: 1dcc1ee314a6907213e2abd5337ec0bbba3bd1bf
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=1dcc1ee314a6907213e2abd5337ec0bbba3bd1bf
Author: Eric Anholt <eric at anholt.net>
Date: Mon Mar 30 10:44:28 2015 -0700
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%)
---
src/gallium/drivers/vc4/vc4_opt_algebraic.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/gallium/drivers/vc4/vc4_opt_algebraic.c b/src/gallium/drivers/vc4/vc4_opt_algebraic.c
index d17669a..e40e0f3 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)) {
More information about the mesa-commit
mailing list