Module: Mesa
Branch: staging/23.0
Commit: f2ea1431710b7330baaf8b713967081e90514852
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=f2ea1431710b7330baaf8b713967081e90514852

Author: Isabella Basso <[email protected]>
Date:   Fri Mar 10 17:20:10 2023 -0300

nir/algebraic: remove duplicate bool conversion lowerings

While [1] added some boolean conversion lowering patterns, those were
already dealt with on [2].

[1] - b86305bb ("nir/algebraic: collapse conversion opcodes (many patterns)")
[2] - d7e0d47b ("nir/algebraic: nir: Add a bunch of b2[if] optimizations")

Fixes: b86305bb ("nir/algebraic: collapse conversion opcodes (many patterns)")
Acked-by: Alyssa Rosenzweig <[email protected]>
Reviewed-by: Georg Lehmann <[email protected]>
Signed-off-by: Isabella Basso <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20965>
(cherry picked from commit 59fea8af3af3fb5bd8133dc6af7c000ebc5915dc)

---

 .pick_status.json                     | 2 +-
 src/compiler/nir/nir_opt_algebraic.py | 5 -----
 2 files changed, 1 insertion(+), 6 deletions(-)

diff --git a/.pick_status.json b/.pick_status.json
index 16debd8d482..19ce43d9ace 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -7060,7 +7060,7 @@
         "description": "nir/algebraic: remove duplicate bool conversion 
lowerings",
         "nominated": true,
         "nomination_type": 1,
-        "resolution": 0,
+        "resolution": 1,
         "main_sha": null,
         "because_sha": "b86305bb5734fdd0511d227b646328ef03c80197"
     },
diff --git a/src/compiler/nir/nir_opt_algebraic.py 
b/src/compiler/nir/nir_opt_algebraic.py
index 104bda19cee..b5f9fc4a04b 100644
--- a/src/compiler/nir/nir_opt_algebraic.py
+++ b/src/compiler/nir/nir_opt_algebraic.py
@@ -986,11 +986,6 @@ for s in [16, 32, 64]:
                (('i2i{}'.format(s), ('i2i{}'.format(B), 'a@{}'.format(s))), a),
                (('u2u{}'.format(s), ('u2u{}'.format(B), 'a@{}'.format(s))), a),
 
-               # bool1 -> typeB -> typeS ==> bool1 -> typeS
-               (('f2f{}'.format(s), ('b2f{}'.format(B), 'a@1')), 
('b2f{}'.format(s), a)),
-               (('i2i{}'.format(s), ('b2i{}'.format(B), 'a@1')), 
('b2i{}'.format(s), a)),
-               (('u2u{}'.format(s), ('b2i{}'.format(B), 'a@1')), 
('b2i{}'.format(s), a)),
-
                # floatS -> floatB -> intB ==> floatS -> intB
                (('f2u{}'.format(B), ('f2f{}'.format(B), 'a@{}'.format(s))), 
('f2u{}'.format(B), a)),
                (('f2i{}'.format(B), ('f2f{}'.format(B), 'a@{}'.format(s))), 
('f2i{}'.format(B), a)),

Reply via email to