summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2014-07-15 21:27:08 -0700
committerKenneth Graunke <[email protected]>2014-07-15 22:12:15 -0700
commita2de6562783ea87ca5fbcb67dbd36c2f345f2054 (patch)
tree734c685741d7d9c0f15730afa5ec846b497962fa /src/mesa
parentcf1b5eee7f36af29d1d5caba3538ad4985e51f81 (diff)
i965: Don't copy propagate abs into Broadwell logic instructions.
It's not clear what abs on logical instructions means on Broadwell, and it doesn't appear to do anything sensible. Fixes 270 Piglit tests (the bitand/bitor/bitxor tests with abs). Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=81157 Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Matt Turner <[email protected]> Cc: "10.2" <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp9
-rw-r--r--src/mesa/drivers/dri/i965/brw_vec4_copy_propagation.cpp9
2 files changed, 6 insertions, 12 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp b/src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp
index 10e19d82ca6..62e64a6773b 100644
--- a/src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp
@@ -338,12 +338,9 @@ 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;
- }
- }
+ if (brw->gen >= 8 && (entry->src.negate || entry->src.abs) &&
+ is_logic_op(inst->opcode)) {
+ return false;
}
inst->src[arg].file = entry->src.file;
diff --git a/src/mesa/drivers/dri/i965/brw_vec4_copy_propagation.cpp b/src/mesa/drivers/dri/i965/brw_vec4_copy_propagation.cpp
index 2c41d0208f2..390448ad801 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4_copy_propagation.cpp
+++ b/src/mesa/drivers/dri/i965/brw_vec4_copy_propagation.cpp
@@ -249,12 +249,9 @@ try_copy_propagate(struct brw_context *brw, vec4_instruction *inst,
value.file != ATTR)
return false;
- if (brw->gen >= 8) {
- if (value.negate) {
- if (is_logic_op(inst->opcode)) {
- return false;
- }
- }
+ if (brw->gen >= 8 && (value.negate || value.abs) &&
+ is_logic_op(inst->opcode)) {
+ return false;
}
if (inst->src[arg].abs) {