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:
@@ -58,8 +58,8 @@ lower_alu_instr(nir_builder *b, nir_alu_instr *alu)
|
||||
/* These we expect to have booleans but the opcode doesn't change */
|
||||
break;
|
||||
|
||||
case nir_op_b2f32: alu->op = nir_op_fmov; break;
|
||||
case nir_op_b2i32: alu->op = nir_op_fmov; break;
|
||||
case nir_op_b2f32: alu->op = nir_op_mov; break;
|
||||
case nir_op_b2i32: alu->op = nir_op_mov; break;
|
||||
case nir_op_f2b1:
|
||||
case nir_op_i2b1:
|
||||
rep = nir_sne(b, nir_ssa_for_alu_src(b, alu, 0),
|
||||
@@ -92,7 +92,6 @@ lower_alu_instr(nir_builder *b, nir_alu_instr *alu)
|
||||
|
||||
case nir_op_bcsel: alu->op = nir_op_fcsel; break;
|
||||
|
||||
case nir_op_imov: alu->op = nir_op_fmov; break;
|
||||
case nir_op_iand: alu->op = nir_op_fmul; break;
|
||||
case nir_op_ixor: alu->op = nir_op_sne; break;
|
||||
case nir_op_ior: alu->op = nir_op_fmax; break;
|
||||
|
||||
Reference in New Issue
Block a user