diff --git a/src/compiler/nir/nir_opt_algebraic.py b/src/compiler/nir/nir_opt_algebraic.py index 0cd50c38d78..aa55e203ffd 100644 --- a/src/compiler/nir/nir_opt_algebraic.py +++ b/src/compiler/nir/nir_opt_algebraic.py @@ -1065,6 +1065,10 @@ optimizations.extend([ (('f2f32', ('i2fmp', 'a@32')), ('i2f32', a)), (('f2f32', ('u2fmp', 'a@32')), ('u2f32', a)), + # Conversions from float32 to float64 and back can be removed as long as + # it doesn't need to be precise, since the conversion may e.g. flush denorms + (('~f2f32', ('f2f64', 'a@32')), a), + (('ffloor', 'a(is_integral)'), a), (('fceil', 'a(is_integral)'), a), (('ftrunc', 'a(is_integral)'), a),