nir: fix GCM when GVN enabled
authorTimothy Arceri <tarceri@itsqueeze.com>
Fri, 6 Aug 2021 13:39:06 +0000 (23:39 +1000)
committerMarge Bot <eric+marge@anholt.net>
Tue, 17 Aug 2021 03:15:49 +0000 (03:15 +0000)
commitedfcc4f0227322fd8f2d72fcf68c96e23b52ba01
tree6fe21e90223629387fa8cb85f451a84fe3f9a6b4
parent104aa6b5d1d31bc7627d7769a5b010e7dd1b7106
nir: fix GCM when GVN enabled

Enabling GVN uncovered a bug where we would crash if the pass
thinking about pushing something into a loop.

Fixes: 6538b3e56614 ("nir: add heuristic for instructions in loops with GCM")

Acked-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12242>
src/compiler/nir/nir_opt_gcm.c