Hi, This is a case when ivopts pass makes too many induction variables, exceeding the number of available registers. If you want to debug it, see ivopts_global_cost_for_size in tree-ssa-loop-ivopts.c and its callers; perhaps, the issue is that it fails to account for IVs created in inner loops when processing outer loops.
In any case, I recommend to create a bug report in the GCC bugzilla for this problem. Hope that helps, Alexander