nir/opt_algebraic: 0 >= a -> 0 == a
Foz-DB Navi21: Totals from 2179 (2.75% of 79377) affected shaders: MaxWaves: 40987 -> 40917 (-0.17%); split: +0.00%, -0.18% Instrs: 5950981 -> 5949310 (-0.03%); split: -0.04%, +0.01% CodeSize: 32120808 -> 32110328 (-0.03%); split: -0.04%, +0.00% VGPRs: 141704 -> 141768 (+0.05%); split: -0.01%, +0.05% SpillSGPRs: 1750 -> 1746 (-0.23%) Latency: 56667295 -> 56562916 (-0.18%); split: -0.19%, +0.00% InvThroughput: 13292128 -> 13288691 (-0.03%); split: -0.03%, +0.00% VClause: 151845 -> 151755 (-0.06%); split: -0.06%, +0.00% SClause: 172316 -> 172443 (+0.07%); split: -0.02%, +0.09% Copies: 458724 -> 458951 (+0.05%); split: -0.08%, +0.13% Branches: 195239 -> 195351 (+0.06%); split: -0.00%, +0.06% PreSGPRs: 135304 -> 135317 (+0.01%); split: -0.01%, +0.02% PreVGPRs: 122430 -> 122428 (-0.00%); split: -0.01%, +0.01% VALU: 3924585 -> 3924062 (-0.01%); split: -0.02%, +0.01% SALU: 820666 -> 819414 (-0.15%); split: -0.17%, +0.02% SMEM: 247036 -> 247142 (+0.04%); split: -0.00%, +0.04% v2 (idr): Remove a pattern that is now redundant. This was originaly removed in a commit later in the MR. Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Reviewed-by: Timur Kristóf <timur.kristof@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33498>
This commit is contained in:
@@ -798,9 +798,9 @@ optimizations.extend([
|
||||
(('fneu', ('u2f', a), 0.0), ('ine', a, 0)),
|
||||
(('feq', ('u2f', a), 0.0), ('ieq', a, 0)),
|
||||
(('fge', ('u2f', a), 0.0), True),
|
||||
(('fge', 0.0, ('u2f', a)), ('uge', 0, a)), # ieq instead?
|
||||
(('fge', 0.0, ('u2f', a)), ('ieq', 0, a)),
|
||||
(('flt', ('u2f', a), 0.0), False),
|
||||
(('flt', 0.0, ('u2f', a)), ('ult', 0, a)), # ine instead?
|
||||
(('flt', 0.0, ('u2f', a)), ('ine', 0, a)),
|
||||
(('fneu', ('i2f', a), 0.0), ('ine', a, 0)),
|
||||
(('feq', ('i2f', a), 0.0), ('ieq', a, 0)),
|
||||
(('fge', ('i2f', a), 0.0), ('ige', a, 0)),
|
||||
@@ -1286,6 +1286,8 @@ optimizations.extend([
|
||||
|
||||
(('uge', a, 1), ('ine', a, 0)),
|
||||
(('ult', a, 1), ('ieq', a, 0)),
|
||||
(('uge', 0, a), ('ieq', a, 0)),
|
||||
(('ult', 0, a), ('ine', a, 0)),
|
||||
|
||||
(('b2i', ('ine', 'a@1', 'b@1')), ('b2i', ('ixor', a, b))),
|
||||
|
||||
@@ -1456,7 +1458,6 @@ for s in [8, 16, 32, 64]:
|
||||
optimizations.extend([
|
||||
(('ige', ('ineg', ('b2i', 'a@1')), 0), ('inot', a)),
|
||||
(('ilt', ('ineg', ('b2i', 'a@1')), 0), a),
|
||||
(('ult', 0, ('ineg', ('b2i', 'a@1'))), a),
|
||||
(('iand', ('ineg', ('b2i', a)), 1.0), ('b2f', a)),
|
||||
(('iand', ('ineg', ('b2i', a)), 1), ('b2i', a)),
|
||||
])
|
||||
|
||||
Reference in New Issue
Block a user