Matt Turner <matts...@gmail.com> writes:

> And avoid rewriting other instructions unnecessarily. Removes a few
> self-moves we weren't able to handle because they were components of a
> large VGRF.
>
> instructions in affected programs:     830 -> 826 (-0.48%)
> ---
>  src/mesa/drivers/dri/i965/brw_fs_register_coalesce.cpp | 16 +++++++++++++---
>  1 file changed, 13 insertions(+), 3 deletions(-)
>
> diff --git a/src/mesa/drivers/dri/i965/brw_fs_register_coalesce.cpp 
> b/src/mesa/drivers/dri/i965/brw_fs_register_coalesce.cpp
> index f6d9b68..8b37ed0 100644
> --- a/src/mesa/drivers/dri/i965/brw_fs_register_coalesce.cpp
> +++ b/src/mesa/drivers/dri/i965/brw_fs_register_coalesce.cpp
> @@ -44,6 +44,12 @@
>  #include "brw_fs_live_variables.h"
>  
>  static bool
> +is_nop_mov(const fs_inst *inst)
> +{
> +   return inst->dst.equals(inst->src[0]);
> +}

I don't think it would be a nop mov if:

inst->saturate
inst->conditional_mod != BRW_CONDITIONAL_NONE

Agreed on that this function should only return true if it's actually a
MOV.

Attachment: pgpLJc8slV76T.pgp
Description: PGP signature

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

Reply via email to