nir: Drop imov/fmov in favor of one mov instruction
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. Now that we've reworked nir_lower_to_source_mods to leave one abs/neg instruction in place rather than replacing them with imov or fmov instructions, we don't need two different instructions at all anymore. Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com> Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com> Acked-by: Rob Clark <robdclark@chromium.org>
This commit is contained in:
@@ -40,16 +40,16 @@ nir_type_conversion_op(nir_alu_type src, nir_alu_type dst, nir_rounding_mode rnd
|
||||
unsigned dst_bit_size = nir_alu_type_get_type_size(dst);
|
||||
|
||||
if (src == dst && src_base == nir_type_float) {
|
||||
return nir_op_fmov;
|
||||
return nir_op_mov;
|
||||
} else if (src == dst && src_base == nir_type_bool) {
|
||||
return nir_op_imov;
|
||||
return nir_op_mov;
|
||||
} else if ((src_base == nir_type_int || src_base == nir_type_uint) &&
|
||||
(dst_base == nir_type_int || dst_base == nir_type_uint) &&
|
||||
src_bit_size == dst_bit_size) {
|
||||
/* Integer <-> integer conversions with the same bit-size on both
|
||||
* ends are just no-op moves.
|
||||
*/
|
||||
return nir_op_imov;
|
||||
return nir_op_mov;
|
||||
}
|
||||
|
||||
switch (src_base) {
|
||||
|
||||
Reference in New Issue
Block a user