instructions in affected programs: 474 -> 462 (-2.53%) --- src/mesa/drivers/dri/i965/brw_fs.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp index 602fc4a..1fe84f3 100644 --- a/src/mesa/drivers/dri/i965/brw_fs.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs.cpp @@ -2082,7 +2082,12 @@ fs_visitor::opt_algebraic() } break; case BRW_OPCODE_SEL: - if (inst->saturate && inst->src[1].file == IMM) { + if (inst->src[0].equals(inst->src[1])) { + inst->opcode = BRW_OPCODE_MOV; + inst->src[1] = reg_undef; + inst->predicate = BRW_PREDICATE_NONE; + progress = true; + } else if (inst->saturate && inst->src[1].file == IMM) { switch (inst->conditional_mod) { case BRW_CONDITIONAL_LE: case BRW_CONDITIONAL_L: -- 1.8.3.2 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev