i965/vec4: Remove useless conditionals.
authorMatt Turner <mattst88@gmail.com>
Sun, 29 Jun 2014 03:33:17 +0000 (20:33 -0700)
committerMatt Turner <mattst88@gmail.com>
Tue, 1 Jul 2014 15:55:52 +0000 (08:55 -0700)
Setting a couple of bits is the same cost or less as conditionally
setting a couple of bits.

src/mesa/drivers/dri/i965/brw_vec4_generator.cpp

index ef0e60767eba6c26d9f9300ce28077327f842a31..d7a4fcea413a1bb58e815ea576b58650696e86e7 100644 (file)
@@ -1266,12 +1266,9 @@ vec4_generator::generate_code(exec_list *instructions)
 
          brw_inst *last = &p->store[pre_emit_nr_insn];
 
-         if (inst->conditional_mod)
-            brw_inst_set_cond_modifier(brw, last, inst->conditional_mod);
-         if (inst->no_dd_clear)
-            brw_inst_set_no_dd_clear(brw, last, true);
-         if (inst->no_dd_check)
-            brw_inst_set_no_dd_check(brw, last, true);
+         brw_inst_set_cond_modifier(brw, last, inst->conditional_mod);
+         brw_inst_set_no_dd_clear(brw, last, inst->no_dd_clear);
+         brw_inst_set_no_dd_check(brw, last, inst->no_dd_check);
       }
    }