broadcom/compiler: set current block on incrementing unifa
authorJuan A. Suarez Romero <jasuarez@igalia.com>
Thu, 12 Aug 2021 08:50:09 +0000 (10:50 +0200)
committerMarge Bot <eric+marge@anholt.net>
Thu, 12 Aug 2021 12:33:46 +0000 (12:33 +0000)
commit2a86d519607d94b21b9cb87263e2f3f98ef14774
tree595093cc34a1720c6252be1095574a5256ef96b8
parent0df911269234badb814460e23079274c3198b356
broadcom/compiler: set current block on incrementing unifa

When incrementing unifa address in DCE optimization, ensure that we
setup correctly the current block, so the ldfunif optimization is also
executed correctly.

This fixes
dEQP-VK.graphicsfuzz.cov-struct-float-array-mix-uniform-vectors
heap-buffer overflow with address sanitizer enabled.

v2 (Iago):
 - Save and restore current block

Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12339>
src/broadcom/compiler/vir_opt_dead_code.c