diff --git a/src/imagination/pco/pco_ra.c b/src/imagination/pco/pco_ra.c index 5f355363a5f..e5eebdbe558 100644 --- a/src/imagination/pco/pco_ra.c +++ b/src/imagination/pco/pco_ra.c @@ -28,6 +28,8 @@ #include #include #include +#include +#include /** Live range of an SSA variable. */ struct live_range { @@ -811,7 +813,10 @@ static bool pco_ra_func(pco_func *func, pco_ra_ctx *ctx) ra_set_node_spill_cost(ra_graph, u, (float)uses[u]); unsigned spill_index = ra_get_best_spill_node(ra_graph); - assert(spill_index != ~0 && "Failed to get best spill node."); + if (spill_index == ~0) { + fprintf(stderr, "FATAL: Failed to get best spill node.\n"); + abort(); + } spill(spill_index, func, ctx);