}
}
+static bool
+is_logic_op(enum opcode opcode)
+{
+ return (opcode == BRW_OPCODE_AND ||
+ opcode == BRW_OPCODE_OR ||
+ opcode == BRW_OPCODE_XOR ||
+ opcode == BRW_OPCODE_NOT);
+}
+
bool
fs_visitor::try_copy_propagate(fs_inst *inst, int arg, acp_entry *entry)
{
if (has_source_modifiers && entry->dst.type != inst->src[arg].type)
return false;
+ if (brw->gen >= 8) {
+ if (entry->src.negate) {
+ if (is_logic_op(inst->opcode)) {
+ return false;
+ }
+ }
+ }
+
inst->src[arg].file = entry->src.file;
inst->src[arg].reg = entry->src.reg;
inst->src[arg].reg_offset = entry->src.reg_offset;