From e7dc88026a821a31bf2afeb934dded11c91401a1 Mon Sep 17 00:00:00 2001 From: Matt Turner Date: Thu, 19 Sep 2013 19:31:31 -0700 Subject: [PATCH] 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 --- src/mesa/drivers/dri/i965/brw_fs.cpp | 3 +-- src/mesa/drivers/dri/i965/brw_vec4.cpp | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) 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(); -- 2.30.2