nir: Do not consider phis with incompatible dests equal
authorFriedrich Vock <friedrich.vock@gmx.de>
Thu, 8 Dec 2022 20:26:28 +0000 (21:26 +0100)
committerMarge Bot <emma+marge@anholt.net>
Sun, 11 Dec 2022 22:13:32 +0000 (22:13 +0000)
commita54c2c828941ef1325fc1a3b49eba32f3c964f0d
treedb58ce189db5d9ec88ef815a8dbfdd203ea1a3ea
parentc9c44d63da418267b1ac6ac733fb40704e785e4b
nir: Do not consider phis with incompatible dests equal

CSE tries to collapse equal instructions, and collapsing two phis with incompatible dests is illegal.

Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Fixes: 6bdce55c ("nir: Add a basic CSE pass")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19960>
src/compiler/nir/nir_instr_set.c