nir: Drop imov/fmov in favor of one mov instruction
authorJason Ekstrand <jason@jlekstrand.net>
Mon, 6 May 2019 16:45:46 +0000 (11:45 -0500)
committerJason Ekstrand <jason@jlekstrand.net>
Fri, 24 May 2019 13:38:11 +0000 (08:38 -0500)
commitf2dc0f28728af63e1a79756dab06a7035fecb590
tree567ce89be4af1fc48d287415ab051929f0e1466e
parent22421ca7be608f38ce701a43e3f6b7f3132b7aab
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>
40 files changed:
src/amd/common/ac_nir_to_llvm.c
src/broadcom/compiler/nir_to_vir.c
src/compiler/glsl/glsl_to_nir.cpp
src/compiler/nir/nir.h
src/compiler/nir/nir_builder.h
src/compiler/nir/nir_from_ssa.c
src/compiler/nir/nir_gather_ssa_types.c
src/compiler/nir/nir_lower_bool_to_float.c
src/compiler/nir/nir_lower_bool_to_int32.c
src/compiler/nir/nir_lower_int_to_float.c
src/compiler/nir/nir_lower_locals_to_regs.c
src/compiler/nir/nir_lower_phis_to_scalar.c
src/compiler/nir/nir_lower_to_source_mods.c
src/compiler/nir/nir_lower_vars_to_ssa.c
src/compiler/nir/nir_lower_vec_to_movs.c
src/compiler/nir/nir_opcodes.py
src/compiler/nir/nir_opcodes_c.py
src/compiler/nir/nir_opt_comparison_pre.c
src/compiler/nir/nir_opt_copy_propagate.c
src/compiler/nir/nir_opt_if.c
src/compiler/nir/nir_opt_peephole_select.c
src/compiler/nir/nir_opt_remove_phis.c
src/compiler/nir/nir_opt_undef.c
src/compiler/nir/nir_split_vars.c
src/compiler/nir/nir_validate.c
src/compiler/spirv/vtn_alu.c
src/compiler/spirv/vtn_opencl.c
src/freedreno/ir3/ir3_compiler_nir.c
src/gallium/auxiliary/nir/tgsi_to_nir.c
src/gallium/drivers/freedreno/a2xx/ir2_nir.c
src/gallium/drivers/lima/ir/gp/nir.c
src/gallium/drivers/lima/ir/pp/nir.c
src/gallium/drivers/nouveau/codegen/nv50_ir_from_nir.cpp
src/gallium/drivers/panfrost/midgard/midgard_compile.c
src/gallium/drivers/vc4/vc4_program.c
src/intel/compiler/brw_fs_nir.cpp
src/intel/compiler/brw_nir_analyze_boolean_resolves.c
src/intel/compiler/brw_nir_opt_peephole_ffma.c
src/intel/compiler/brw_vec4_nir.cpp
src/mesa/program/prog_to_nir.c