nir: Just return when asked to rewrite uses of an SSA def to itself.
authorEric Anholt <eric@anholt.net>
Mon, 25 Feb 2019 19:22:10 +0000 (11:22 -0800)
committerEric Anholt <eric@anholt.net>
Mon, 25 Feb 2019 21:25:24 +0000 (21:25 +0000)
commit7c1bf075f30527ec9724fe03f0a32d9110bebd0b
treea3787a864bf7b57f07d701883c4455ba357ac67f
parent5671f38085216caf2cbf221a9fcda08b7571a762
nir: Just return when asked to rewrite uses of an SSA def to itself.

The nir_builder swizzling improvement to not emit extra MOVs resulted in
nir_lower_tex() trying to rewrite an SSA def to itself, triggering the
assert on all texturing in v3d.  There's no work to be done in this case,
so just stop asserting.

Fixes: 743700be1f58 ("nir/builder: Don't emit no-op swizzles")
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
src/compiler/nir/nir.c