aco: disable mul(cndmask(0, 1, b), a) optimization sometimes
authorRhys Perry <pendingchaos02@gmail.com>
Tue, 19 Oct 2021 09:43:03 +0000 (10:43 +0100)
committerMarge Bot <eric+marge@anholt.net>
Wed, 20 Oct 2021 07:35:52 +0000 (07:35 +0000)
commit9bc0fc89c8909fd5cc9c591aa98038f927a01e0e
tree9ab1ac17ce199bba1ea24316b3b080e743aaf768
parent86b3d8c66ce17ddcaefa5bdea68882cc03a57f15
aco: disable mul(cndmask(0, 1, b), a) optimization sometimes

This optimization doesn't work for SDWA or DPP multiplications and we
can't do it if denormal flushing is required because v_cndmask_b32 doesn't
do that and we can't do it if we can't assume operands are finite because
0.0 * inf is NaN, not 0.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13434>
src/amd/compiler/aco_optimizer.cpp