On Tuesday, May 27, 2014 06:47:50 PM Matt Turner wrote:
> 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 c0af6d0..453683c 100644
> --- a/src/mesa/drivers/dri/i965/brw_fs.cpp
> +++ b/src/mesa/drivers/dri/i965/brw_fs.cpp
> @@ -2021,7 +2021,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;

I'd probably add

         inst->predicate_inverse = false;

just in case.  Otherwise, this patch is:
Reviewed-by: Kenneth Graunke <kenn...@whitecape.org>

> +            progress = true;
> +         } else if (inst->saturate && inst->src[1].file == IMM) {
>              switch (inst->conditional_mod) {
>              case BRW_CONDITIONAL_LE:
>              case BRW_CONDITIONAL_L:
> 

Attachment: signature.asc
Description: This is a digitally signed message part.

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to