mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-03 03:28:09 +02:00
nir/range_analysis: unsigned upper bound analysis for b2i
fossil-db (navi21): Totals from 93 (0.07% of 135636) affected shaders: Instrs: 133949 -> 133899 (-0.04%); split: -0.05%, +0.01% CodeSize: 708124 -> 707528 (-0.08%); split: -0.09%, +0.01% Latency: 2451564 -> 2450158 (-0.06%); split: -0.06%, +0.00% InvThroughput: 398282 -> 397345 (-0.24%) SClause: 4441 -> 4437 (-0.09%); split: -0.18%, +0.09% Copies: 7578 -> 7546 (-0.42%); split: -0.55%, +0.13% Signed-off-by: Rhys Perry <pendingchaos02@gmail.com> Reviewed-by: Daniel Schürmann <daniel@schuermann.dev> Reviewed-by: Timur Kristóf <timur.kristof@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20117>
This commit is contained in:
parent
ccbb4648cb
commit
9b7217d12e
1 changed files with 8 additions and 0 deletions
|
|
@ -1526,6 +1526,9 @@ nir_unsigned_upper_bound(nir_shader *shader, struct hash_table *range_ht,
|
|||
case nir_op_extract_i8:
|
||||
case nir_op_extract_u16:
|
||||
case nir_op_extract_i16:
|
||||
case nir_op_b2i8:
|
||||
case nir_op_b2i16:
|
||||
case nir_op_b2i32:
|
||||
break;
|
||||
case nir_op_u2u1:
|
||||
case nir_op_u2u8:
|
||||
|
|
@ -1657,6 +1660,11 @@ nir_unsigned_upper_bound(nir_shader *shader, struct hash_table *range_ht,
|
|||
case nir_op_u2u32:
|
||||
res = MIN2(src0, max);
|
||||
break;
|
||||
case nir_op_b2i8:
|
||||
case nir_op_b2i16:
|
||||
case nir_op_b2i32:
|
||||
res = 1;
|
||||
break;
|
||||
case nir_op_sad_u8x4:
|
||||
res = src2 + 4 * 255;
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue