[Mesa-dev] [PATCH v4 32/40] intel/compiler: skip MAD algebraic optimization for half-float or mixed mode

Jason Ekstrand jason at jlekstrand.net
Sat Feb 16 15:31:04 UTC 2019


Reviewed-by: Jason Ekstrand <jason at jlekstrand.net>

On Tue, Feb 12, 2019 at 5:56 AM Iago Toral Quiroga <itoral at igalia.com>
wrote:

> It is very likely that this optimzation is never useful and we'll probably
> just end up removing it, so let's not bother adding more cases to it for
> now.
> ---
>  src/intel/compiler/brw_fs.cpp | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/src/intel/compiler/brw_fs.cpp b/src/intel/compiler/brw_fs.cpp
> index 873a1dd8196..aeabaefd6df 100644
> --- a/src/intel/compiler/brw_fs.cpp
> +++ b/src/intel/compiler/brw_fs.cpp
> @@ -2655,6 +2655,10 @@ fs_visitor::opt_algebraic()
>           }
>           break;
>        case BRW_OPCODE_MAD:
> +         if (inst->src[0].type != BRW_REGISTER_TYPE_F ||
> +             inst->src[1].type != BRW_REGISTER_TYPE_F ||
> +             inst->src[2].type != BRW_REGISTER_TYPE_F)
> +            break;
>           if (inst->src[1].is_one()) {
>              inst->opcode = BRW_OPCODE_ADD;
>              inst->src[1] = inst->src[2];
> --
> 2.17.1
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20190216/8a1af2b5/attachment-0001.html>


More information about the mesa-dev mailing list