summaryrefslogtreecommitdiff
path: root/src/compiler/nir
diff options
context:
space:
mode:
authorIsabella Basso <isabellabdoamaral@usp.br>2023-03-10 17:20:07 -0300
committerMarge Bot <emma+marge@anholt.net>2023-03-11 17:21:37 +0000
commitb3685f3ba7fddbe73f363ff4d53ca734841e4b06 (patch)
tree04897747a0e132514a5813ddccb5e22da1d879de /src/compiler/nir
parent2ba48eea88a1209d3d7d6ac5f6881ffb52a9d5dc (diff)
nir/algebraic: insert patterns inside optimizations list
Some patterns were outside the list of optimizations. Fixes: b86305bb ("nir/algebraic: collapse conversion opcodes (many patterns)") Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Reviewed-by: Georg Lehmann <dadschoorse@gmail.com> Signed-off-by: Isabella Basso <isabellabdoamaral@usp.br> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20965>
Diffstat (limited to 'src/compiler/nir')
-rw-r--r--src/compiler/nir/nir_opt_algebraic.py18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/compiler/nir/nir_opt_algebraic.py b/src/compiler/nir/nir_opt_algebraic.py
index 0162c33fc3b..e8445246979 100644
--- a/src/compiler/nir/nir_opt_algebraic.py
+++ b/src/compiler/nir/nir_opt_algebraic.py
@@ -976,18 +976,18 @@ for s in [16, 32, 64]:
(('fadd', ('b2f{}'.format(s), ('flt', 0.0, 'a@{}'.format(s))), ('fneg', ('b2f{}'.format(s), ('flt', 'a@{}'.format(s), 0.0)))), ('fsign', a), '!options->lower_fsign'),
(('iadd', ('b2i{}'.format(s), ('flt', 0, 'a@{}'.format(s))), ('ineg', ('b2i{}'.format(s), ('flt', 'a@{}'.format(s), 0)))), ('f2i{}'.format(s), ('fsign', a)), '!options->lower_fsign'),
- ])
- # float? -> float? -> floatS ==> float? -> floatS
- (('~f2f{}'.format(s), ('f2f', a)), ('f2f{}'.format(s), a)),
+ # float? -> float? -> floatS ==> float? -> floatS
+ (('~f2f{}'.format(s), ('f2f', a)), ('f2f{}'.format(s), a)),
- # int? -> float? -> floatS ==> int? -> floatS
- (('~f2f{}'.format(s), ('u2f', a)), ('u2f{}'.format(s), a)),
- (('~f2f{}'.format(s), ('i2f', a)), ('i2f{}'.format(s), a)),
+ # int? -> float? -> floatS ==> int? -> floatS
+ (('~f2f{}'.format(s), ('u2f', a)), ('u2f{}'.format(s), a)),
+ (('~f2f{}'.format(s), ('i2f', a)), ('i2f{}'.format(s), a)),
- # float? -> float? -> intS ==> float? -> intS
- (('~f2u{}'.format(s), ('f2f', a)), ('f2u{}'.format(s), a)),
- (('~f2i{}'.format(s), ('f2f', a)), ('f2i{}'.format(s), a)),
+ # float? -> float? -> intS ==> float? -> intS
+ (('~f2u{}'.format(s), ('f2f', a)), ('f2u{}'.format(s), a)),
+ (('~f2i{}'.format(s), ('f2f', a)), ('f2i{}'.format(s), a)),
+ ])
for B in [32, 64]:
if s < B: