nir: Only rematerialize comparisons with all SSA sources
authorJason Ekstrand <jason@jlekstrand.net>
Fri, 19 Jul 2019 18:07:39 +0000 (13:07 -0500)
committerJason Ekstrand <jason@jlekstrand.net>
Fri, 19 Jul 2019 19:45:36 +0000 (19:45 +0000)
commit6301f80b840d50f2f8ec4fc46adfe8ad43da53ab
tree214c701b13ac99818da2ac8a7a9aa3566cdf8d31
parente352b4d650d37730e5087792b9a74ef31d1974ab
nir: Only rematerialize comparisons with all SSA sources

Otherwise, you may end up moving a register read and that could result
in an incorrect shader.  This commit fixes a rendering issue in Elite:
Dangerous.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=111152
Fixes: 3ee2e84c60 "nir: Rematerialize compare instructions"
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
src/compiler/nir/nir_opt_rematerialize_compares.c