nv50/ir: VFETCH is also considered a load for MemoryOpt
authorIlia Mirkin <imirkin@alum.mit.edu>
Sat, 24 Jun 2017 21:08:11 +0000 (17:08 -0400)
committerIlia Mirkin <imirkin@alum.mit.edu>
Tue, 27 Jun 2017 00:24:19 +0000 (20:24 -0400)
This has no effect since in practice this will only play for
memory-backed files, for which VFETCH will never happen.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp

index 5dac2f64f0a1e3547fffa39a4a9a68d837d3d9ca..c6dbd4fead4d86fe43f5610fa63065c878a09807 100644 (file)
@@ -2641,7 +2641,7 @@ MemoryOpt::findRecord(const Instruction *insn, bool load, bool& isAdj) const
    Record *it = load ? loads[sym->reg.file] : stores[sym->reg.file];
 
    for (; it; it = it->next) {
-      if (it->locked && insn->op != OP_LOAD)
+      if (it->locked && insn->op != OP_LOAD && insn->op != OP_VFETCH)
          continue;
       if ((it->offset >> 4) != (sym->reg.data.offset >> 4) ||
           it->rel[0] != insn->getIndirect(0, 0) ||