aco: error when block has no logical preds but VGPRs are live at the start

This would have caught the liveness error fixed in the previous commit.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3257>
This commit is contained in:
Rhys Perry 2020-01-08 16:13:03 +00:00 committed by Marge Bot
parent d282a292ec
commit 4e83e05e62

View file

@ -220,7 +220,8 @@ void process_live_temps_per_block(Program *program, live& lives, Block* block,
phi_idx--;
}
if (!(block->index != 0 || (live_vgprs.empty() && live_sgprs.empty()))) {
if ((block->logical_preds.empty() && !live_vgprs.empty()) ||
(block->linear_preds.empty() && !live_sgprs.empty())) {
aco_print_program(program, stderr);
fprintf(stderr, "These temporaries are never defined or are defined after use:\n");
for (Temp vgpr : live_vgprs)