The patch is to fix the problem described in https://llvm.org/bugs/show_bug.cgi?id=23217
The problem is: When loop vectorization decide not to vectorize a loop (VF==1), it may still unroll the loop. However, the unroll factor may be smaller than the factor computed in loop unroll pass, so loop unroll pass may unroll the already unrolled loop once more and unroll the remainder loop at the same time.
I don't see the benefit of unrolling when VF==1. The patch is to disable the unrolling when VF==1 in loop vectorization pass, and let loop unroll pass to do the unrolling for such loop.
Performance neutral for spec2000. Google internal benchmarks: detection improved by 5% on sandybridge and 9% on westmere, saw improved by 1.5% on both platforms.