Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Signed-off-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6283>
continue;
intr->dest.ssa.bit_size = 16;
+
+ nir_builder b;
+ nir_builder_init(&b, function->impl);
+ b.cursor = nir_after_instr(instr);
+
+ /* The f2f32(f2fmp(x)) will cancel by opt_algebraic */
+ nir_ssa_def *conv = nir_f2f32(&b, &intr->dest.ssa);
+ nir_ssa_def_rewrite_uses_after(&intr->dest.ssa, nir_src_for_ssa(conv), conv->parent_instr);
+
progress |= true;
}
}