rs6000_hard_regno_mode_ok_uncached result depends on target flags, and nowadays it is possible that TARGET_OPTION_OVERRIDE be called not just at the start of compilation but per-function by the action of function attributes or "#pragma GCC target". At the start of compilation rs6000_hard_regno_mode_ok_p[][] is a clean slate, but not so later on.
Bootstrapped etc. powerpc64le-linux. If gcc wasn't in stage 4 I'd apply this as obvious, but I doubt it is a regression, and the patch is just a tiny bit more than a doc fix. So, OK now or wait for stage 1? * config/rs6000/rs6000.c (rs6000_init_hard_regno_mode_ok): Always assign rs6000_hard_regno_mode_ok_p[m][r]. Formatting. diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index 06ce2892bf9..f132c3a27c8 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -3463,13 +3463,13 @@ rs6000_init_hard_regno_mode_ok (bool global_init_p) for (r = 0; HARD_REGISTER_NUM_P (r); ++r) for (m = 0; m < NUM_MACHINE_MODES; ++m) rs6000_hard_regno_nregs[m][r] - = rs6000_hard_regno_nregs_internal (r, (machine_mode)m); + = rs6000_hard_regno_nregs_internal (r, (machine_mode) m); /* Precalculate TARGET_HARD_REGNO_MODE_OK. */ for (r = 0; HARD_REGISTER_NUM_P (r); ++r) for (m = 0; m < NUM_MACHINE_MODES; ++m) - if (rs6000_hard_regno_mode_ok_uncached (r, (machine_mode)m)) - rs6000_hard_regno_mode_ok_p[m][r] = true; + rs6000_hard_regno_mode_ok_p[m][r] + = rs6000_hard_regno_mode_ok_uncached (r, (machine_mode) m); /* Precalculate CLASS_MAX_NREGS sizes. */ for (c = 0; c < LIM_REG_CLASSES; ++c) -- Alan Modra Australia Development Lab, IBM