i965/compaction: Remove unnecessary is-compacted? check.
authorMatt Turner <mattst88@gmail.com>
Wed, 24 Sep 2014 17:01:23 +0000 (10:01 -0700)
committerMatt Turner <mattst88@gmail.com>
Thu, 25 Sep 2014 18:02:36 +0000 (11:02 -0700)
Used to pass over previously compacted instructions in this loop, but no
longer. No point in checking.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
src/mesa/drivers/dri/i965/brw_eu_compact.c

index 56179476b7c498efdbe408eaca9acbd232daa755..6af134cafd5422e578b2799b0f9f313769bb14e6 100644 (file)
@@ -737,6 +737,8 @@ brw_try_compact_instruction(struct brw_context *brw, brw_compact_inst *dst,
 {
    brw_compact_inst temp;
 
+   assert(brw_inst_cmpt_control(brw, src) == 0);
+
    if (brw_inst_opcode(brw, src) == BRW_OPCODE_IF ||
        brw_inst_opcode(brw, src) == BRW_OPCODE_ELSE ||
        brw_inst_opcode(brw, src) == BRW_OPCODE_ENDIF ||
@@ -1117,8 +1119,7 @@ brw_compact_instructions(struct brw_compile *p, int start_offset,
 
       brw_inst saved = *src;
 
-      if (!brw_inst_cmpt_control(brw, src) &&
-          brw_try_compact_instruction(brw, dst, src)) {
+      if (brw_try_compact_instruction(brw, dst, src)) {
          compacted_count++;
 
          if (INTEL_DEBUG) {