nir/lower_bit_size: use nir_builder::constant_fold_alu

This commit is contained in:
Daniel Schürmann 2026-04-29 15:32:38 +02:00
parent 82501c380c
commit b0665d1926
2 changed files with 2 additions and 3 deletions

View file

@ -556,9 +556,7 @@ radv_postprocess_nir(const struct radv_compiler_info *compiler_info, const struc
if (gfx_level >= GFX8)
nir_divergence_analysis(stage->nir);
if (nir_lower_bit_size(stage->nir, ac_nir_lower_bit_size_callback, &gfx_level)) {
NIR_PASS(_, stage->nir, nir_opt_constant_folding);
}
NIR_PASS(_, stage->nir, nir_lower_bit_size, ac_nir_lower_bit_size_callback, &gfx_level);
}
if (gfx_level >= GFX9) {
bool separate_g16 = gfx_level >= GFX10;

View file

@ -323,6 +323,7 @@ lower_impl(nir_function_impl *impl,
void *callback_data)
{
nir_builder b = nir_builder_create(impl);
b.constant_fold_alu = true;
bool progress = false;
nir_foreach_block(block, impl) {