projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
64122b1
)
vc4: Optimize out silly SUBs of 0.
author
Eric Anholt
<eric@anholt.net>
Thu, 25 Sep 2014 04:57:06 +0000
(21:57 -0700)
committer
Eric Anholt
<eric@anholt.net>
Mon, 29 Sep 2014 18:33:34 +0000
(11:33 -0700)
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.
src/gallium/drivers/vc4/vc4_opt_algebraic.c
patch
|
blob
|
history
diff --git
a/src/gallium/drivers/vc4/vc4_opt_algebraic.c
b/src/gallium/drivers/vc4/vc4_opt_algebraic.c
index b5cde0511d00715044e4627da1079686391754aa..f88a5c17d2ad7fc1eccc386cf2ee47d1067ca84c 100644
(file)
--- a/
src/gallium/drivers/vc4/vc4_opt_algebraic.c
+++ b/
src/gallium/drivers/vc4/vc4_opt_algebraic.c
@@
-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;
}