mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 03:08:05 +02:00
radeonsi: use nir_umul_high for fast udiv
nir has dedicated alu op for it. Also for removing int64 multiply which aco does not support. Reviewed-by: Marek Olšák <marek.olsak@amd.com> Signed-off-by: Qiang Yu <yuq825@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23096>
This commit is contained in:
parent
95ff215be2
commit
90b56e99f4
1 changed files with 1 additions and 2 deletions
|
|
@ -32,8 +32,7 @@ fast_udiv_nuw(nir_builder *b, nir_ssa_def *num, nir_ssa_def *divisor)
|
|||
|
||||
num = nir_ushr(b, num, pre_shift);
|
||||
num = nir_iadd_nuw(b, num, increment);
|
||||
num = nir_imul(b, nir_u2u64(b, num), nir_u2u64(b, multiplier));
|
||||
num = nir_unpack_64_2x32_split_y(b, num);
|
||||
num = nir_umul_high(b, num, multiplier);
|
||||
return nir_ushr(b, num, post_shift);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue