> + if (live_range && flow_bb_inside_loop_p (loop, e->src)) > + {
Doesn't this match several cases more than before i.e set the range start to zero fairly often? I mean if it works fine with me and the code is easier to read. Please split off the search for the non-contiguous load/stores into a separate function still. With that change it's OK from my side. Regards Robin