pan/bi: Don't check liveness unless the index is valid
authorIcecream95 <ixn@disroot.org>
Tue, 9 Feb 2021 07:32:23 +0000 (20:32 +1300)
committerIcecream95 <ixn@disroot.org>
Tue, 9 Feb 2021 07:40:46 +0000 (20:40 +1300)
commit5cc0d61088732bf0e70ae5f7579506723e881c12
treecd18ddeade57d2dc4cb230db241d12eb8019a7b2
parent9e1aa234485613154cc1ad2b67988fa5df460a18
pan/bi: Don't check liveness unless the index is valid

Otherwise we will read out-of-bounds when the index is ~0.

Fixes: b8f042c9bb0 ("pan/bi: Dead code eliminate per-channel")
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8923>
src/panfrost/bifrost/bi_opt_dce.c