Mesa (master): nir: Add algebraic opt for no-op iand.
Eric Anholt
anholt at kemper.freedesktop.org
Wed Aug 5 03:10:46 UTC 2015
Module: Mesa
Branch: master
Commit: a70f63ab20d8bf922a307a92020237b1dec36314
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=a70f63ab20d8bf922a307a92020237b1dec36314
Author: Eric Anholt <eric at anholt.net>
Date: Fri Jul 31 09:12:48 2015 -0700
nir: Add algebraic opt for no-op iand.
I lazily generated some of these in VC4 NIR lowering.
Reviewed-by: Iago Toral Quiroga <itoral at igalia.com>
---
src/glsl/nir/nir_opt_algebraic.py | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/glsl/nir/nir_opt_algebraic.py b/src/glsl/nir/nir_opt_algebraic.py
index 3068445..d7c1740 100644
--- a/src/glsl/nir/nir_opt_algebraic.py
+++ b/src/glsl/nir/nir_opt_algebraic.py
@@ -132,6 +132,7 @@ optimizations = [
# Logical and bit operations
(('fand', a, 0.0), 0.0),
(('iand', a, a), a),
+ (('iand', a, ~0), a),
(('iand', a, 0), 0),
(('ior', a, a), a),
(('ior', a, 0), a),
More information about the mesa-commit
mailing list