diff --git a/src/compiler/nir/nir.h b/src/compiler/nir/nir.h index 0d3222b5d1e..06987a8eeee 100644 --- a/src/compiler/nir/nir.h +++ b/src/compiler/nir/nir.h @@ -2871,6 +2871,9 @@ typedef struct { /* Estimated cost (in number of instructions) of the loop */ unsigned instr_cost; + /* Contains fp64 ops that will be lowered */ + bool has_soft_fp64; + /* Guessed trip count based on array indexing */ unsigned guessed_trip_count; diff --git a/src/compiler/nir/nir_loop_analyze.c b/src/compiler/nir/nir_loop_analyze.c index 8e0b72e6d71..309cf580db9 100644 --- a/src/compiler/nir/nir_loop_analyze.c +++ b/src/compiler/nir/nir_loop_analyze.c @@ -216,8 +216,10 @@ instr_cost(loop_info_state *state, nir_instr *instr, cost *= 20; /* If it's full software, it's even more expensive */ - if (options->lower_doubles_options & nir_lower_fp64_full_software) + if (options->lower_doubles_options & nir_lower_fp64_full_software) { cost *= 100; + state->loop->info->has_soft_fp64 = true; + } return cost; } else {