Mesa (master): nv50/ir: delete MINMAX instruction that is no longer in the BB

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Sat Nov 17 07:49:52 UTC 2018


Module: Mesa
Branch: master
Commit: 955d943c33d55ebb469efaeb5710d42e267b121a
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=955d943c33d55ebb469efaeb5710d42e267b121a

Author: Ilia Mirkin <imirkin at alum.mit.edu>
Date:   Sun Nov 11 02:19:36 2018 -0500

nv50/ir: delete MINMAX instruction that is no longer in the BB

We removed the op from the BB, but it was still listed in its sources'
uses. This could trip up some logic down the line which analyzes all the
uses of an l-value, e.g. spilling.

Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu>
Reviewed-by: Karol Herbst <kherbst at redhat.com>

---

 src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp
index 8767e5efb9..04d26dcbf5 100644
--- a/src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp
+++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp
@@ -1898,7 +1898,7 @@ AlgebraicOpt::handleMINMAX(Instruction *minmax)
    if (minmax->src(0).mod == minmax->src(1).mod) {
       if (minmax->def(0).mayReplace(minmax->src(0))) {
          minmax->def(0).replace(minmax->src(0), false);
-         minmax->bb->remove(minmax);
+         delete_Instruction(prog, minmax);
       } else {
          minmax->op = OP_CVT;
          minmax->setSrc(1, NULL);




More information about the mesa-commit mailing list