[midgard_alu_op_ixor] = {"ixor", UNITS_ADD | OP_COMMUTES},
[midgard_alu_op_ilzcnt] = {"ilzcnt", UNITS_ADD},
[midgard_alu_op_ibitcount8] = {"ibitcount8", UNITS_ADD},
- [midgard_alu_op_inot] = {"inot", UNITS_MOST},
+ [midgard_alu_op_inand] = {"inand", UNITS_MOST},
[midgard_alu_op_ishl] = {"ishl", UNITS_ADD},
[midgard_alu_op_iasr] = {"iasr", UNITS_ADD},
[midgard_alu_op_ilsr] = {"ilsr", UNITS_ADD},
midgard_alu_op_ishl = 0x6E,
midgard_alu_op_iand = 0x70,
midgard_alu_op_ior = 0x71,
- midgard_alu_op_inot = 0x72,
+ midgard_alu_op_inand = 0x72, /* ~(a & b), for inot let a = b */
midgard_alu_op_iandnot = 0x74, /* (a, b) -> a & ~b, used for not/b2f */
midgard_alu_op_ixor = 0x76,
midgard_alu_op_ilzcnt = 0x78, /* Number of zeroes on left. 31 - ilzcnt(x) = findMSB(x) */
ALU_CASE(iand, iand);
ALU_CASE(ior, ior);
ALU_CASE(ixor, ixor);
- ALU_CASE(inot, inot);
+ ALU_CASE(inot, inand);
ALU_CASE(ishl, ishl);
ALU_CASE(ishr, iasr);
ALU_CASE(ushr, ilsr);
ins.has_constants = true;
ins.constants[0] = 0.0f;
ins.alu.src2 = vector_alu_srco_unsigned(blank_alu_src_xxxx);
+ } else if (instr->op == nir_op_inot) {
+ /* ~b = ~(b & b), so duplicate the source */
+ ins.ssa_args.src1 = ins.ssa_args.src0;
+ ins.alu.src2 = ins.alu.src1;
}
if ((opcode_props & UNITS_ALL) == UNIT_VLUT) {