Mesa (master): nir/opt_algebraic: Fix rules for imadsh_mix16

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Jun 10 20:36:34 UTC 2019


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

Author: Eduardo Lima Mitev <elima at igalia.com>
Date:   Mon Jun 10 21:38:39 2019 +0200

nir/opt_algebraic: Fix rules for imadsh_mix16

The rules added in patch 3addd7c are inverted:

It should be:

(al * bh) << 16 + c

instead of:

(ah * bl) << 16 + c

Fixes a number of regressions under
dEQP-GLES31.functional.draw_indirect.compute_interop.large.*
on Freedreno.

Reviewed-by: Rob Clark <robdclark at gmail.com>

---

 src/compiler/nir/nir_opt_algebraic.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/compiler/nir/nir_opt_algebraic.py b/src/compiler/nir/nir_opt_algebraic.py
index e4cdce4865b..f1b5893be88 100644
--- a/src/compiler/nir/nir_opt_algebraic.py
+++ b/src/compiler/nir/nir_opt_algebraic.py
@@ -1110,8 +1110,8 @@ optimizations += [
    # 'al * bl': If either 'al' or 'bl' is zero, return zero.
    (('umul_low', '#a(is_lower_half_zero)', 'b'), (0)),
    # '(ah * bl) << 16 + c': If either 'ah' or 'bl' is zero, return 'c'.
-   (('imadsh_mix16', '#a at 32(is_upper_half_zero)', 'b at 32', 'c at 32'), ('c')),
-   (('imadsh_mix16', 'a at 32', '#b at 32(is_lower_half_zero)', 'c at 32'), ('c')),
+   (('imadsh_mix16', '#a at 32(is_lower_half_zero)', 'b at 32', 'c at 32'), ('c')),
+   (('imadsh_mix16', 'a at 32', '#b at 32(is_upper_half_zero)', 'c at 32'), ('c')),
 ]
 
 # This section contains "late" optimizations that should be run before




More information about the mesa-commit mailing list