From: Rhys Perry Date: Thu, 1 Dec 2022 20:22:16 +0000 (+0000) Subject: nir/range_analysis: unsigned upper bound analysis for b2i X-Git-Tag: upstream/23.3.3~15918 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9b7217d12e955fe9819cb67b33d8d715b701d9d7;p=platform%2Fupstream%2Fmesa.git 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 Reviewed-by: Daniel Schürmann Reviewed-by: Timur Kristóf Part-of: --- diff --git a/src/compiler/nir/nir_range_analysis.c b/src/compiler/nir/nir_range_analysis.c index 56fd3f0..7770bcf 100644 --- a/src/compiler/nir/nir_range_analysis.c +++ b/src/compiler/nir/nir_range_analysis.c @@ -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;