lima/ppir: don't optimize loads with different block successors
authorErico Nunes <nunes.erico@gmail.com>
Sun, 30 Jul 2023 17:12:53 +0000 (19:12 +0200)
committerMarge Bot <emma+marge@anholt.net>
Tue, 1 Aug 2023 18:36:49 +0000 (18:36 +0000)
commit87a17039496c70165e15608d2ea14c331adafc4a
treee66df388e4d6aa012fecf17351d2156c0d292f37
parentc124fa4a4f37ee1c2195d210b21e51226c4223b0
lima/ppir: don't optimize loads with different block successors

Even if loads are initially duplicated for each user, with new
optimizations such as folding modifiers, it may happen that loads
end up with only users in different blocks.
Handle that and don't delete or pipeline those nodes.

Signed-off-by: Erico Nunes <nunes.erico@gmail.com>
Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24246>
src/gallium/drivers/lima/ir/pp/lower.c