diff options
Diffstat (limited to 'gcc/loop.c')
-rw-r--r-- | gcc/loop.c | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -3298,8 +3298,14 @@ loop_invariant_p (const struct loop *loop, rtx x) return 0; /* Out-of-range regs can occur when we are called from unrolling. - These have always been created by the unroller and are set in - the loop, hence are never invariant. */ + These registers created by the unroller are set in the loop, + hence are never invariant. + Other out-of-range regs can be generated by load_mems; those that + are written to in the loop are not invariant, while those that are + not written to are invariant. It would be easy for load_mems + to set n_times_set correctly for these registers, however, there + is no easy way to distinguish them from registers created by the + unroller. */ if (REGNO (x) >= (unsigned) regs->num) return 0; |