From: Matt Turner Date: Fri, 20 Sep 2013 02:31:31 +0000 (-0700) Subject: i965: Fixup for don't dead-code eliminate instructions that write to the accumulator. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e7dc88026a821a31bf2afeb934dded11c91401a1;p=mesa.git 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 Reviewed-by: Kenneth Graunke --- diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp index b83aca447e5..d287bfdbd10 100644 --- a/src/mesa/drivers/dri/i965/brw_fs.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs.cpp @@ -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(); diff --git a/src/mesa/drivers/dri/i965/brw_vec4.cpp b/src/mesa/drivers/dri/i965/brw_vec4.cpp index 790ff2ebc72..149a1a0e165 100644 --- a/src/mesa/drivers/dri/i965/brw_vec4.cpp +++ b/src/mesa/drivers/dri/i965/brw_vec4.cpp @@ -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();