From: Iago Toral Quiroga Date: Tue, 12 Feb 2019 08:34:10 +0000 (+0100) Subject: intel/compiler: skip MAD algebraic optimization for half-float or mixed mode X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=6d87c651c90c24d5b670e1d9ba91754846e3b34d;p=mesa.git intel/compiler: skip MAD algebraic optimization for half-float or mixed mode 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. Reviewed-by: Jason Ekstrand --- diff --git a/src/intel/compiler/brw_fs.cpp b/src/intel/compiler/brw_fs.cpp index 186275b3240..14d10a60413 100644 --- a/src/intel/compiler/brw_fs.cpp +++ b/src/intel/compiler/brw_fs.cpp @@ -2693,6 +2693,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];