From f2dc0f28728af63e1a79756dab06a7035fecb590 Mon Sep 17 00:00:00 2001 From: Jason Ekstrand Date: Mon, 6 May 2019 11:45:46 -0500 Subject: 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 Reviewed-by: Alyssa Rosenzweig Reviewed-by: Vasily Khoruzhick Acked-by: Rob Clark --- src/compiler/nir/nir_from_ssa.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/compiler/nir/nir_from_ssa.c') diff --git a/src/compiler/nir/nir_from_ssa.c b/src/compiler/nir/nir_from_ssa.c index 92effe56101..b406e7401d6 100644 --- a/src/compiler/nir/nir_from_ssa.c +++ b/src/compiler/nir/nir_from_ssa.c @@ -551,7 +551,7 @@ emit_copy(nir_builder *b, nir_src src, nir_src dest_src) else assert(src.reg.reg->num_components >= dest_src.reg.reg->num_components); - nir_alu_instr *mov = nir_alu_instr_create(b->shader, nir_op_imov); + nir_alu_instr *mov = nir_alu_instr_create(b->shader, nir_op_mov); nir_src_copy(&mov->src[0].src, &src, mov); mov->dest.dest = nir_dest_for_reg(dest_src.reg.reg); mov->dest.write_mask = (1 << dest_src.reg.reg->num_components) - 1; @@ -852,7 +852,7 @@ place_phi_read(nir_shader *shader, nir_register *reg, } } - nir_alu_instr *mov = nir_alu_instr_create(shader, nir_op_imov); + nir_alu_instr *mov = nir_alu_instr_create(shader, nir_op_mov); mov->src[0].src = nir_src_for_ssa(def); mov->dest.dest = nir_dest_for_reg(reg); mov->dest.write_mask = (1 << reg->num_components) - 1; @@ -889,7 +889,7 @@ nir_lower_phis_to_regs_block(nir_block *block) nir_register *reg = create_reg_for_ssa_def(&phi->dest.ssa, impl); - nir_alu_instr *mov = nir_alu_instr_create(shader, nir_op_imov); + nir_alu_instr *mov = nir_alu_instr_create(shader, nir_op_mov); mov->src[0].src = nir_src_for_reg(reg); mov->dest.write_mask = (1 << phi->dest.ssa.num_components) - 1; nir_ssa_dest_init(&mov->instr, &mov->dest.dest, @@ -989,7 +989,7 @@ nir_lower_ssa_defs_to_regs_block(nir_block *block) nir_register *reg = create_reg_for_ssa_def(&load->def, state.impl); nir_ssa_def_rewrite_uses(&load->def, nir_src_for_reg(reg)); - nir_alu_instr *mov = nir_alu_instr_create(shader, nir_op_imov); + nir_alu_instr *mov = nir_alu_instr_create(shader, nir_op_mov); mov->src[0].src = nir_src_for_ssa(&load->def); mov->dest.dest = nir_dest_for_reg(reg); mov->dest.write_mask = (1 << reg->num_components) - 1; -- cgit v1.2.3