[Mesa-dev] [PATCH 6/7] i965/fs: Dead code eliminate MOV null.

Matt Turner mattst88 at gmail.com
Tue Oct 22 22:07:37 CEST 2013


---
 src/mesa/drivers/dri/i965/brw_fs.cpp | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp
index 5336851..a03acae 100644
--- a/src/mesa/drivers/dri/i965/brw_fs.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs.cpp
@@ -1923,6 +1923,15 @@ fs_visitor::dead_code_eliminate()
                break;
             }
          }
+      } else if (inst->dst.is_null()) {
+         switch (inst->opcode) {
+         case BRW_OPCODE_MOV:
+            inst->remove();
+            progress = true;
+            break;
+         default:
+            break;
+         }
       }
 
       pc++;
-- 
1.8.3.2



More information about the mesa-dev mailing list