summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRhys Perry <[email protected]>2020-01-08 16:13:03 +0000
committerMarge Bot <[email protected]>2020-01-29 18:02:27 +0000
commit4e83e05e62101a5e3a4d8c30a16ca15294af18b1 (patch)
tree32845b957a92f8ceb35d49973c99a4f64bc319f6
parentd282a292eca05bd9f701d8509d674e4697f510ec (diff)
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 <[email protected]> Reviewed-by: Daniel Schürmann <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3257>
-rw-r--r--src/amd/compiler/aco_live_var_analysis.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/amd/compiler/aco_live_var_analysis.cpp b/src/amd/compiler/aco_live_var_analysis.cpp
index c00325b92b7..1f02e67bc1a 100644
--- a/src/amd/compiler/aco_live_var_analysis.cpp
+++ b/src/amd/compiler/aco_live_var_analysis.cpp
@@ -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)