i965: Fix a weirdness in NOT handling.

XOR makes much more sense.  Note that the previous code would have
failed for not(not(x)), but that gets optimized out.
This commit is contained in:
Eric Anholt
2010-10-18 11:13:26 -07:00
parent ea213417f1
commit 746e68c50b
+1 -1
View File
@@ -720,7 +720,7 @@ fs_visitor::visit(ir_expression *ir)
/* Note that BRW_OPCODE_NOT is not appropriate here, since it is
* ones complement of the whole register, not just bit 0.
*/
emit(fs_inst(BRW_OPCODE_ADD, this->result, op[0], fs_reg(-1)));
emit(fs_inst(BRW_OPCODE_XOR, this->result, op[0], fs_reg(1)));
break;
case ir_unop_neg:
op[0].negate = !op[0].negate;