intel/fs: Don't delete coalesced MOVs if they have a cmod
authorJason Ekstrand <jason@jlekstrand.net>
Mon, 27 Apr 2020 20:31:12 +0000 (15:31 -0500)
committerMarge Bot <eric+marge@anholt.net>
Wed, 29 Apr 2020 16:45:51 +0000 (16:45 +0000)
commite581ddeeeecf9475d0634794ee126096d0f23135
treeeb704325e13cd75f554062b0e14c65adb345f28d
parent6fe7d6758a5ddc09bc5d186b8219fb9ad807fad4
intel/fs: Don't delete coalesced MOVs if they have a cmod

Shader-db results on ICL:

    total instructions in shared programs: 17133088 -> 17133287 (<.01%)
    instructions in affected programs: 61300 -> 61499 (0.32%)
    helped: 0
    HURT: 199

This means it's likely fixing 199 bugs. :-)  All the changed shaders are
in Mad Max.  It's surprisingly difficult to get the back-end compiler to
generate a pattern that hits this we don't tend to emit a lot coalescable
MOVs.  The pattern in Mad Max that's able to hit is fsign(fsat(x)) under
the right conditions.

Closes: #2820
Cc: mesa-stable@lists.freedesktop.org
Tested-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4773>
src/intel/compiler/brw_fs_register_coalesce.cpp