i965: Fixup for don't dead-code eliminate instructions that write to the accumulator.

Accidentally pushed an old version of the patch.

v2: Set destination register using brw_null_reg().
Reviewed-by: Paul Berry <stereotype441@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
This commit is contained in:
Matt Turner 2013-09-19 19:31:31 -07:00
parent c4e6569fc8
commit e7dc88026a
2 changed files with 2 additions and 4 deletions

View file

@ -1854,8 +1854,7 @@ fs_visitor::dead_code_eliminate()
case BRW_OPCODE_ADDC:
case BRW_OPCODE_SUBB:
case BRW_OPCODE_MACH:
inst->dst.file = ARF;
inst->dst.reg = BRW_ARF_NULL;
inst->dst = fs_reg(retype(brw_null_reg(), inst->dst.type));
break;
default:
inst->remove();

View file

@ -322,8 +322,7 @@ vec4_visitor::dead_code_eliminate()
case BRW_OPCODE_ADDC:
case BRW_OPCODE_SUBB:
case BRW_OPCODE_MACH:
inst->dst.file = ARF;
inst->dst.reg = BRW_ARF_NULL;
inst->dst = dst_reg(retype(brw_null_reg(), inst->dst.type));
break;
default:
inst->remove();