diff options
author | Iago Toral Quiroga <[email protected]> | 2019-02-12 09:34:10 +0100 |
---|---|---|
committer | Juan A. Suarez Romero <[email protected]> | 2019-04-18 11:05:18 +0200 |
commit | 6d87c651c90c24d5b670e1d9ba91754846e3b34d (patch) | |
tree | f5ca89e5c4e88f351fd7bb6ee8702d328a4083d6 /src/intel/compiler | |
parent | 64b93292ac19f9a74005108575e25fe7e47eee82 (diff) |
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 <[email protected]>
Diffstat (limited to 'src/intel/compiler')
-rw-r--r-- | src/intel/compiler/brw_fs.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
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]; |