By disabling completely the loop unroll when optimizing for size (/Os), the #pragma unroll have no effect at that optimization level.
This contradicts the paragraph in an llvm blog post about the loop pragmas (http://blog.llvm.org/2014/11/loop-vectorization-diagnostics-and.html) saying the following:
For example, when compiling for size (-Os) it's a good idea to vectorize the hot loops of the application to improve performance. Vectorization, interleaving, and unrolling can be explicitly specified using the #pragma clang loop directive prior to any for, while, do-while, or c++11 range-based for loop.
Also, as explained in a previous commit, the loop unroll pass already have the logic to handle optimizing for size (http://lists.llvm.org/pipermail/cfe-commits/Week-of-Mon-20130805/085399.html).