diff --git a/src/compiler/nir/nir_opt_algebraic.py b/src/compiler/nir/nir_opt_algebraic.py index 6446c4915b7..c56610774ba 100644 --- a/src/compiler/nir/nir_opt_algebraic.py +++ b/src/compiler/nir/nir_opt_algebraic.py @@ -1800,6 +1800,10 @@ optimizations.extend([ # Reduce intermediate precision with int64. (('u2u32', ('iadd(is_used_once)', 'a@64', b)), ('iadd', ('u2u32', a), ('u2u32', b))), + + # Lowered pack followed by lowered unpack, for the high bits + (('u2u32', ('ushr', ('ior', ('ishl', a, 32), ('u2u64', b)), 32)), ('u2u32', a)), + (('u2u16', ('ushr', ('ior', ('ishl', a, 16), ('u2u32', b)), 16)), ('u2u16', a)), ]) # After the ('extract_u8', a, 0) pattern, above, triggers, there will be