r600/sfn: remove code for nir_op_fsign since it is lowered

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9330>
This commit is contained in:
Gert Wollny
2021-02-26 21:23:39 +01:00
parent 4fe0339941
commit ddc5c99402
2 changed files with 0 additions and 68 deletions

View File

@@ -81,8 +81,6 @@ bool EmitAluInstruction::do_emit(nir_instr* ir)
case nir_op_fceil: return emit_alu_op1(instr, op1_ceil);
case nir_op_ffract: return emit_alu_op1(instr, op1_fract);
case nir_op_ffloor: return emit_alu_op1(instr, op1_floor);
case nir_op_fsign: return emit_fsign(instr);
case nir_op_fdph: return emit_fdph(instr);
case nir_op_ibitfield_extract: return emit_bitfield_extract(instr, op3_bfe_int);
@@ -1017,71 +1015,6 @@ bool EmitAluInstruction::emit_alu_op2_split_src_mods(const nir_alu_instr& instr,
return true;
}
bool EmitAluInstruction::emit_fsign(const nir_alu_instr& instr)
{
PValue help[4];
PValue src[4];
AluInstruction *ir = nullptr;
for (int i = 0; i < 4 ; ++i) {
help[i] = from_nir(instr.dest, i);
src[i] = m_src[0][i];
}
if (instr.src[0].abs) {
for (int i = 0; i < 4 ; ++i) {
if (instr.dest.write_mask & (1 << i)){
ir = new AluInstruction(op2_setgt, help[i], src[i], Value::zero, write);
ir->set_flag(alu_src0_abs);
emit_instruction(ir);
}
}
if (ir)
ir->set_flag(alu_last_instr);
if (instr.src[0].negate) {
for (int i = 0; i < 4 ; ++i) {
if (instr.dest.write_mask & (1 << i)){
ir = new AluInstruction(op1_mov, help[i], help[i], write);
ir->set_flag(alu_src0_neg);
emit_instruction(ir);
}
}
if (ir)
ir->set_flag(alu_last_instr);
}
return true;
}
for (int i = 0; i < 4 ; ++i) {
if (instr.dest.write_mask & (1 << i)){
ir = new AluInstruction(op3_cndgt, help[i], src[i], Value::one_f, src[i], write);
if (instr.src[0].negate) {
ir->set_flag(alu_src0_neg);
ir->set_flag(alu_src2_neg);
}
emit_instruction(ir);
}
}
if (ir)
ir->set_flag(alu_last_instr);
for (int i = 0; i < 4 ; ++i) {
if (instr.dest.write_mask & (1 << i)){
ir = new AluInstruction(op3_cndgt, help[i], help[i], Value::one_f, help[i], write);
ir->set_flag(alu_src0_neg);
ir->set_flag(alu_src1_neg);
emit_instruction(ir);
}
}
if (ir)
ir->set_flag(alu_last_instr);
return true;
}
bool EmitAluInstruction::emit_alu_op3(const nir_alu_instr& instr, EAluOp opcode,
std::array<uint8_t, 3> reorder)
{

View File

@@ -72,7 +72,6 @@ private:
bool emit_alu_b2f(const nir_alu_instr& instr);
bool emit_alu_i2orf2_b1(const nir_alu_instr& instr, EAluOp op);
bool emit_dot(const nir_alu_instr& instr, int n);
bool emit_fsign(const nir_alu_instr& instr);
bool emit_create_vec(const nir_alu_instr& instr, unsigned nc);
bool emit_any_all_icomp(const nir_alu_instr& instr, EAluOp op, unsigned nc, bool all);
bool emit_any_iequal(const nir_alu_instr& instr, unsigned nc);