Mesa (master): intel/compiler: Remove unnecessary optimization for MUL

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Jun 17 00:43:42 UTC 2020


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

Author: Sagar Ghuge <sagar.ghuge at intel.com>
Date:   Mon Jun  8 15:35:29 2020 -0700

intel/compiler: Remove unnecessary optimization for MUL

2 source instruction only support immediate for src1 operand, so no
point in adding optimization condition for src0 oprand.

v2:
- Update commit message and don't remove ADD optimization (Matt Turner)

Signed-off-by: Sagar Ghuge <sagar.ghuge at intel.com>
Reviewed-by: Matt Turner <mattst88 at gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5341>

---

 src/intel/compiler/brw_fs.cpp | 8 --------
 1 file changed, 8 deletions(-)

diff --git a/src/intel/compiler/brw_fs.cpp b/src/intel/compiler/brw_fs.cpp
index 1b0327e157e..a41d15270b9 100644
--- a/src/intel/compiler/brw_fs.cpp
+++ b/src/intel/compiler/brw_fs.cpp
@@ -2698,14 +2698,6 @@ fs_visitor::opt_algebraic()
             break;
          }
 
-         if (inst->src[0].file == IMM) {
-            assert(inst->src[0].type == BRW_REGISTER_TYPE_F);
-            inst->opcode = BRW_OPCODE_MOV;
-            inst->src[0].f *= inst->src[1].f;
-            inst->src[1] = reg_undef;
-            progress = true;
-            break;
-         }
          break;
       case BRW_OPCODE_ADD:
          if (inst->src[1].file != IMM)



More information about the mesa-commit mailing list