diff --git a/src/amd/compiler/aco_register_allocation.cpp b/src/amd/compiler/aco_register_allocation.cpp index 36ec765f760..b8014e62b8c 100644 --- a/src/amd/compiler/aco_register_allocation.cpp +++ b/src/amd/compiler/aco_register_allocation.cpp @@ -1214,9 +1214,8 @@ get_regs_for_copies(ra_ctx& ctx, RegisterFile& reg_file, n++; continue; } - /* we cannot split live ranges of linear vgprs inside control flow */ - if (!(ctx.block->kind & block_kind_top_level) && - ctx.assignments[reg_file[j]].rc.is_linear_vgpr()) { + /* we cannot split live ranges of linear vgprs */ + if (ctx.assignments[reg_file[j]].rc.is_linear_vgpr()) { found = false; break; } @@ -1363,10 +1362,8 @@ get_reg_impl(ra_ctx& ctx, const RegisterFile& reg_file, break; } - /* we cannot split live ranges of linear vgprs inside control flow */ - // TODO: ensure that live range splits inside control flow are never necessary - if (!(ctx.block->kind & block_kind_top_level) && - ctx.assignments[reg_file[j]].rc.is_linear_vgpr()) { + /* we cannot split live ranges of linear vgprs */ + if (ctx.assignments[reg_file[j]].rc.is_linear_vgpr()) { found = false; break; } @@ -1967,13 +1964,9 @@ get_reg_create_vector(ra_ctx& ctx, const RegisterFile& reg_file, Temp temp, avoid |= ctx.war_hint[j]; } - if (linear_vgpr) { - /* we cannot split live ranges of linear vgprs inside control flow */ - if (ctx.block->kind & block_kind_top_level) - avoid = true; - else - continue; - } + /* we cannot split live ranges of linear vgprs */ + if (linear_vgpr) + continue; if (avoid && !best_avoid) continue;