mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-04 13:30:11 +01:00
nir/loop_analyze: adjust negative (or huge) iteration count check for bit size
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28150>
This commit is contained in:
parent
52efb6cc83
commit
e74f5b16e3
1 changed files with 1 additions and 1 deletions
|
|
@ -889,7 +889,7 @@ get_iteration(nir_op cond_op, nir_const_value initial, nir_const_value step,
|
|||
}
|
||||
|
||||
uint64_t iter_u64 = nir_const_value_as_uint(iter, iter_bit_size);
|
||||
return iter_u64 > INT_MAX ? -1 : (int)iter_u64;
|
||||
return iter_u64 > u_intN_max(iter_bit_size) ? -1 : (int)iter_u64;
|
||||
}
|
||||
|
||||
static int32_t
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue