Skip to content

nir: Replace imov and fmov with a single mov instruction

Faith Ekstrand requested to merge gfxstrand/mesa:review/nir-untyped-mov into master

The difference between imov and fmov has been a constant source of confusion in NIR for years. No one really knows why we have two or when to use one vs. the other. The real reason is that they do different things in the presence of source and destination modifiers. However, without modifiers (which many back-ends don't have), they are identical.

This MR reworks things to get rid of the two separate instructions and replace them with a single typeless nir_op_mov instruction similar to nir_op_vec[1-4]. The nir_lower_to_source_mods pass is reworked to leave one nir_op_[ui]abs/neg instruction in place rather than replacing them with nir_op_[if]mov instructions so we no longer have any move instructions with source modifiers. At that point, nir_op_imov and nir_op_fmov are identical and we don't need two different instructions at all anymore.

This series has no shader-db changes on Kaby Lake.

Edited by Faith Ekstrand

Merge request reports