summaryrefslogtreecommitdiffstats
path: root/src/compiler/nir/nir_opt_algebraic.py
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2016-04-25 12:41:44 -0700
committerJason Ekstrand <[email protected]>2016-04-27 11:21:06 -0700
commit7e0ee3a38b033aad12a0c19dc5437bc9c011437a (patch)
tree874c7f4956f9a038e64be62b9c1d392ee5432aa3 /src/compiler/nir/nir_opt_algebraic.py
parentfcc1c8a43728ac9c9d3cd144d034e4925ec5bbcc (diff)
nir/search: Respect the bit_size parameter on nir_search_value
Reviewed-by: Samuel Iglesias Gonsálvez <[email protected]> Reviewed-by: Iago Toral Quiroga <[email protected]>
Diffstat (limited to 'src/compiler/nir/nir_opt_algebraic.py')
-rw-r--r--src/compiler/nir/nir_opt_algebraic.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/compiler/nir/nir_opt_algebraic.py b/src/compiler/nir/nir_opt_algebraic.py
index fa7d7c7e96f..fc439f08363 100644
--- a/src/compiler/nir/nir_opt_algebraic.py
+++ b/src/compiler/nir/nir_opt_algebraic.py
@@ -56,7 +56,10 @@ d = 'd'
#
# All expression types can have a bit-size specified. For opcodes, this
# looks like "op@32", for variables it is "a@32" or "a@uint32" to specify a
-# type and size, and for literals, you can write "2.0@32".
+# type and size, and for literals, you can write "2.0@32". In the search half
+# of the expression this indicates that it should only match that particular
+# bit-size. In the replace half of the expression this indicates that the
+# constructed value should have that bit-size.
optimizations = [
(('fneg', ('fneg', a)), a),