Mesa (master): i965: Fixup for don' t dead-code eliminate instructions that write to the accumulator.
Matt Turner
mattst88 at kemper.freedesktop.org
Mon Oct 7 18:41:53 UTC 2013
Module: Mesa
Branch: master
Commit: e7dc88026a821a31bf2afeb934dded11c91401a1
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=e7dc88026a821a31bf2afeb934dded11c91401a1
Author: Matt Turner <mattst88 at gmail.com>
Date: Thu Sep 19 19:31:31 2013 -0700
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 at gmail.com>
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
---
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 b83aca4..d287bfd 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 790ff2e..149a1a0 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();
More information about the mesa-commit
mailing list