Mesa (master): intel/compiler: Only GE and L modifiers are commutative for SEL

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Apr 17 15:32:59 UTC 2020


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

Author: Ian Romanick <ian.d.romanick at intel.com>
Date:   Tue Oct 29 17:02:46 2019 -0700

intel/compiler: Only GE and L modifiers are commutative for SEL

Reviewed-by: Matt Turner <mattst88 at gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4582>

---

 src/intel/compiler/brw_fs_copy_propagation.cpp | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/intel/compiler/brw_fs_copy_propagation.cpp b/src/intel/compiler/brw_fs_copy_propagation.cpp
index bc5af9732b3..a33043573a5 100644
--- a/src/intel/compiler/brw_fs_copy_propagation.cpp
+++ b/src/intel/compiler/brw_fs_copy_propagation.cpp
@@ -823,7 +823,11 @@ fs_visitor::try_constant_propagate(fs_inst *inst, acp_entry *entry)
          if (i == 1) {
             inst->src[i] = val;
             progress = true;
-         } else if (i == 0 && inst->src[1].file != IMM) {
+         } else if (i == 0 && inst->src[1].file != IMM &&
+                    (inst->conditional_mod == BRW_CONDITIONAL_NONE ||
+                     /* Only GE and L are commutative. */
+                     inst->conditional_mod == BRW_CONDITIONAL_GE ||
+                     inst->conditional_mod == BRW_CONDITIONAL_L)) {
             inst->src[0] = inst->src[1];
             inst->src[1] = val;
 



More information about the mesa-commit mailing list