partially unroll a loop when fully unrolling would not fit under the threshold. Patch by Mikael Lepistö. llvm-svn: 54160