Mesa (master): nir/opt_vectorize: fix typo in instr_can_rewrite()

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Sat Jan 9 11:30:56 UTC 2021


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

Author: Rhys Perry <pendingchaos02 at gmail.com>
Date:   Fri Jan  8 15:13:44 2021 +0000

nir/opt_vectorize: fix typo in instr_can_rewrite()

Signed-off-by: Rhys Perry <pendingchaos02 at gmail.com>
Reviewed-by: Eric Anholt <eric at anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8391>

---

 src/compiler/nir/nir_opt_vectorize.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/compiler/nir/nir_opt_vectorize.c b/src/compiler/nir/nir_opt_vectorize.c
index 5c2873b6e82..80cfdbba446 100644
--- a/src/compiler/nir/nir_opt_vectorize.c
+++ b/src/compiler/nir/nir_opt_vectorize.c
@@ -158,7 +158,7 @@ instr_can_rewrite(nir_instr *instr, bool vectorize_16bit)
           * outside of max_components: these should better be scalarized */
          uint32_t mask = vectorize_16bit ? ~1 : ~3;
          for (unsigned j = 0; j < alu->dest.dest.ssa.num_components; j++) {
-            if ((alu->src[i].swizzle[0] & mask) != (alu->src[i].swizzle[i] & mask))
+            if ((alu->src[i].swizzle[0] & mask) != (alu->src[i].swizzle[j] & mask))
                return false;
          }
       }



More information about the mesa-commit mailing list