summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i965
diff options
context:
space:
mode:
authorFrancisco Jerez <[email protected]>2016-02-26 17:28:03 -0800
committerFrancisco Jerez <[email protected]>2016-03-06 12:22:40 -0800
commitc70b7c80e3e1dea150ece96e02ef3d364284812d (patch)
treef0e841e613c7fe4c77a3c8005d26d3fb87a8141c /src/mesa/drivers/dri/i965
parentdcf5e19e6564662ef3f7a4c7d42acc46a24e62c6 (diff)
i965: Don't try copy propagation if constant propagation succeeded.
It cannot get any better. Reviewed-by: Iago Toral Quiroga <[email protected]> Reviewed-by: Matt Turner <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/i965')
-rw-r--r--src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp3
-rw-r--r--src/mesa/drivers/dri/i965/brw_vec4_copy_propagation.cpp3
2 files changed, 2 insertions, 4 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 9dbe13df514..2616e65fc62 100644
--- a/src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp
@@ -737,8 +737,7 @@ fs_visitor::opt_copy_propagate_local(void *copy_prop_ctx, bblock_t *block,
foreach_in_list(acp_entry, entry, &acp[inst->src[i].nr % ACP_HASH_SIZE]) {
if (try_constant_propagate(inst, entry))
progress = true;
-
- if (try_copy_propagate(inst, i, entry))
+ else if (try_copy_propagate(inst, i, entry))
progress = true;
}
}
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 5c2516473a5..1da49fbc82a 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4_copy_propagation.cpp
+++ b/src/mesa/drivers/dri/i965/brw_vec4_copy_propagation.cpp
@@ -453,8 +453,7 @@ vec4_visitor::opt_copy_propagation(bool do_constant_prop)
if (do_constant_prop && try_constant_propagate(devinfo, inst, i, &entry))
progress = true;
-
- if (try_copy_propagate(devinfo, inst, i, &entry, attributes_per_reg))
+ else if (try_copy_propagate(devinfo, inst, i, &entry, attributes_per_reg))
progress = true;
}