summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2013-08-05 17:12:12 -0700
committerKenneth Graunke <[email protected]>2013-08-12 13:12:57 -0700
commitd21f542aa1f8305ae9d149d97f987c81d2a81bca (patch)
tree8579dd0c50ba8f7962edc6380de826602dbd0a42 /src
parent53d8cff63b30326eaaafe3019d00354d4775a622 (diff)
i965/fs: Explicitly disallow CSE on predicated instructions.
The existing inst->is_partial_write() already disallows predicated instructions, so this has no functional change. However, it's worth doing explicitly since the CSE pass does not consider the flag register. This means it could blindly factor out operations that use the same sources, but which have different condition codes set. This prevents a regression in the next commit. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Matt Turner <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/mesa/drivers/dri/i965/brw_fs_cse.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_fs_cse.cpp b/src/mesa/drivers/dri/i965/brw_fs_cse.cpp
index 9b60d9be41b..e715c3767b9 100644
--- a/src/mesa/drivers/dri/i965/brw_fs_cse.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs_cse.cpp
@@ -97,7 +97,9 @@ fs_visitor::opt_cse_local(bblock_t *block, exec_list *aeb)
inst = (fs_inst *) inst->next) {
/* Skip some cases. */
- if (is_expression(inst) && !inst->is_partial_write() &&
+ if (is_expression(inst) &&
+ !inst->predicate &&
+ !inst->is_partial_write() &&
!inst->conditional_mod)
{
bool found = false;