nir/algebraic: propagate b2i out of ior/iand
Totals from 761 (0.57% of 134368) affected shaders (Polaris): SGPRs: 29496 -> 29488 (-0.03%) SpillSGPRs: 41 -> 43 (+4.88%) CodeSize: 1922036 -> 1882408 (-2.06%); split: -2.08%, +0.02% Instrs: 366051 -> 360362 (-1.55%); split: -1.57%, +0.02% Cycles: 7692516 -> 7661216 (-0.41%); split: -0.41%, +0.01% VMEM: 365175 -> 365172 (-0.00%) VClause: 15324 -> 15322 (-0.01%) SClause: 9825 -> 9824 (-0.01%); split: -0.02%, +0.01% Copies: 41216 -> 41294 (+0.19%); split: -0.01%, +0.20% Branches: 7020 -> 7033 (+0.19%) PreSGPRs: 22103 -> 22106 (+0.01%) PreVGPRs: 26518 -> 26515 (-0.01%) Reviewed-by: Rhys Perry <pendingchaos02@gmail.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4830>
This commit is contained in:
committed by
Marge Bot
parent
baee5a9812
commit
27244662f2
@@ -753,6 +753,8 @@ optimizations.extend([
|
||||
(('feq', ('fneg', a), a), ('feq', a, 0.0)),
|
||||
# Emulating booleans
|
||||
(('imul', ('b2i', 'a@1'), ('b2i', 'b@1')), ('b2i', ('iand', a, b))),
|
||||
(('iand', ('b2i', 'a@1'), ('b2i', 'b@1')), ('b2i', ('iand', a, b))),
|
||||
(('ior', ('b2i', 'a@1'), ('b2i', 'b@1')), ('b2i', ('ior', a, b))),
|
||||
(('fmul', ('b2f', 'a@1'), ('b2f', 'b@1')), ('b2f', ('iand', a, b))),
|
||||
(('fsat', ('fadd', ('b2f', 'a@1'), ('b2f', 'b@1'))), ('b2f', ('ior', a, b))),
|
||||
(('iand', 'a@bool32', 1.0), ('b2f', a)),
|
||||
|
||||
Reference in New Issue
Block a user