panfrost/midgard: Only copyprop without an outmod
authorAlyssa Rosenzweig <alyssa@rosenzweig.io>
Sat, 27 Apr 2019 23:49:52 +0000 (23:49 +0000)
committerAlyssa Rosenzweig <alyssa@rosenzweig.io>
Sun, 28 Apr 2019 21:34:32 +0000 (21:34 +0000)
With an outmod, we would need to propagate that through, which is for
future work.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
src/gallium/drivers/panfrost/midgard/midgard_compile.c

index 0a9978655a7e4765277017cc12f7000a18efcf10..b5e29fee91d538a5061099aeb1bf5b0aa5e802ca 100644 (file)
@@ -3165,6 +3165,7 @@ midgard_opt_copy_prop(compiler_context *ctx, midgard_block *block)
                 bool is_int = midgard_is_integer_op(ins->alu.op);
 
                 if (mir_nontrivial_mod(src, is_int, mask)) continue;
+                if (ins->alu.outmod != midgard_outmod_none) continue;
 
                 mir_foreach_instr_in_block_from(block, v, mir_next_op(ins)) {
                         if (v->ssa_args.src0 == to) {