Mesa (master): nir/opt_vectorize: fix srcs_equal() with two different non-const
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Sat Jan 9 11:30:56 UTC 2021
Module: Mesa
Branch: master
Commit: b634d7f3e2b09b2f98c02397aba2f065749e2d2a
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=b634d7f3e2b09b2f98c02397aba2f065749e2d2a
Author: Rhys Perry <pendingchaos02 at gmail.com>
Date: Fri Jan 8 15:23:07 2021 +0000
nir/opt_vectorize: fix srcs_equal() with two different non-const
To match hash_alu_src(), this should return false if both are different
non-const ssa defs.
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 80cfdbba446..2e110a09b04 100644
--- a/src/compiler/nir/nir_opt_vectorize.c
+++ b/src/compiler/nir/nir_opt_vectorize.c
@@ -80,7 +80,7 @@ srcs_equal(const nir_src *src1, const nir_src *src2)
assert(src2->is_ssa);
return src1->ssa == src2->ssa ||
- nir_src_is_const(*src1) == nir_src_is_const(*src2);
+ (nir_src_is_const(*src1) && nir_src_is_const(*src2));
}
static bool
More information about the mesa-commit
mailing list