Mesa (master): nir/algebraic: Make an optimization more specific
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Sun Dec 16 21:03:23 UTC 2018
Module: Mesa
Branch: master
Commit: b569093566f9138dc8890fe1ef9615d11177d140
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=b569093566f9138dc8890fe1ef9615d11177d140
Author: Jason Ekstrand <jason.ekstrand at intel.com>
Date: Wed Dec 5 21:32:11 2018 -0600
nir/algebraic: Make an optimization more specific
Later in this series, bool is not going to imply 32-bit.
Reviewed-by: Eric Anholt <eric at anholt.net>
Reviewed-by: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>
Tested-by: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>
---
src/compiler/nir/nir_opt_algebraic.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/compiler/nir/nir_opt_algebraic.py b/src/compiler/nir/nir_opt_algebraic.py
index 57abe7c995..1f1dd9e8b7 100644
--- a/src/compiler/nir/nir_opt_algebraic.py
+++ b/src/compiler/nir/nir_opt_algebraic.py
@@ -440,7 +440,7 @@ optimizations = [
(('imul', ('b2i', 'a at 32'), ('b2i', 'b at 32')), ('b2i', ('iand', a, b))),
(('fmul', ('b2f', 'a at 32'), ('b2f', 'b at 32')), ('b2f', ('iand', a, b))),
(('fsat', ('fadd', ('b2f', 'a at 32'), ('b2f', 'b at 32'))), ('b2f', ('ior', a, b))),
- (('iand', 'a at bool', 1.0), ('b2f', a)),
+ (('iand', 'a at bool32', 1.0), ('b2f', a)),
# True/False are ~0 and 0 in NIR. b2i of True is 1, and -1 is ~0 (True).
(('ineg', ('b2i32', 'a at 32')), a),
(('flt', ('fneg', ('b2f', 'a at 32')), 0), a), # Generated by TGSI KILL_IF.
More information about the mesa-commit
mailing list