r600/sfn: lower ineg in nir

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36101>
This commit is contained in:
Gert Wollny 2025-06-24 23:38:18 +02:00 committed by Marge Bot
parent 43d877ce1a
commit 5697e6bb31
2 changed files with 1 additions and 24 deletions

View file

@ -1129,6 +1129,7 @@ bool r600_common_screen_init(struct r600_common_screen *rscreen,
.lower_flrp64 = true,
.lower_fdiv = true,
.lower_isign = true,
.lower_ineg = true,
.lower_fsign = true,
.lower_fmod = true,
.lower_uadd_carry = true,

View file

@ -1384,8 +1384,6 @@ emit_alu_op3(const nir_alu_instr& alu,
Shader& shader,
const std::array<int, 3>& src_shuffle = {0, 1, 2});
static bool
emit_alu_comb_with_zero(const nir_alu_instr& alu, EAluOp opcode, Shader& shader);
static bool
emit_unpack_64_2x32_split(const nir_alu_instr& alu, int comp, Shader& shader);
static bool
emit_pack_64_2x32(const nir_alu_instr& alu, Shader& shader);
@ -1750,8 +1748,6 @@ AluInstr::from_nir(nir_alu_instr *alu, Shader& shader)
return emit_alu_op2_int(*alu, op2_setne_int, shader);
case nir_op_ine:
return emit_alu_op2_int(*alu, op2_setne_int, shader);
case nir_op_ineg:
return emit_alu_comb_with_zero(*alu, op2_sub_int, shader);
case nir_op_inot:
return emit_alu_op1(*alu, op1_not_int, shader);
case nir_op_ior:
@ -2508,26 +2504,6 @@ emit_create_vec(const nir_alu_instr& instr, unsigned nc, Shader& shader)
return true;
}
static bool
emit_alu_comb_with_zero(const nir_alu_instr& alu, EAluOp opcode, Shader& shader)
{
auto& value_factory = shader.value_factory();
AluInstr *ir = nullptr;
auto pin = pin_for_components(alu);
for (unsigned i = 0; i < alu.def.num_components; ++i) {
ir = new AluInstr(opcode,
value_factory.dest(alu.def, i, pin),
value_factory.zero(),
value_factory.src(alu.src[0], i),
AluInstr::write);
shader.emit_instruction(ir);
}
if (ir)
ir->set_alu_flag(alu_last_instr);
return true;
}
static bool
emit_pack_64_2x32_split(const nir_alu_instr& alu, Shader& shader)
{