mcrosier added a comment.
In http://reviews.llvm.org/D19827#419870, @mamai wrote:
> I think the blog comment is right. The pragma should make the loop unroll
> even in /Os. I think it is essential to allow the user to optimize some
> specific loops even if he generally wants to optimize for siz
mamai added a subscriber: tyler.nowicki.
mamai added a comment.
I think the blog comment is right. The pragma should make the loop unroll even
in /Os. I think it is essential to allow the user to optimize some specific
loops even if he generally wants to optimize for size the rest of the code. I
mcrosier added a subscriber: mcrosier.
mcrosier added a comment.
I believe the LLVM blog post is in error. Loop vectorization commonly
generates two versions of the loop: vectorized and scalar. The scalar loop is
necessary to handle the case where the trip count isn't evenly divisible by the
mamai created this revision.
mamai added a reviewer: chandlerc.
mamai added a subscriber: cfe-commits.
mamai set the repository for this revision to rL LLVM.
By disabling completely the loop unroll at some optimization levels (e.g. /Os),
the #pragma unroll have no effect at those optimization lev