summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/mesa/drivers/dri/i965/brw_fs_dead_code_eliminate.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_fs_dead_code_eliminate.cpp b/src/mesa/drivers/dri/i965/brw_fs_dead_code_eliminate.cpp
index 8a0469a51b9..04901a97e40 100644
--- a/src/mesa/drivers/dri/i965/brw_fs_dead_code_eliminate.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs_dead_code_eliminate.cpp
@@ -77,9 +77,8 @@ fs_visitor::dead_code_eliminate()
}
}
- if ((inst->opcode != BRW_OPCODE_IF &&
- inst->opcode != BRW_OPCODE_WHILE) &&
- inst->dst.is_null() &&
+ if (inst->dst.is_null() &&
+ !inst->is_control_flow() &&
!inst->has_side_effects() &&
!inst->flags_written() &&
!inst->writes_accumulator) {