<div dir="ltr">On Tue, Jun 4, 2013 at 11:26 PM, Nadav Rotem <span dir="ltr"><<a href="mailto:nrotem@apple.com" target="_blank">nrotem@apple.com</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">The loop vectorizer is already aware of the ‘optsize’ attribute and it does not vectorize loops which require that we keep the scalar tail. It also does not unroll loops when optimizing for size. It is not obvious but there are many cases in which this conservative kind of vectorization is profitable.  The loop vectorizer does not try to estimate the encoding size of instructions and this is one reason for code growth.<br>
</blockquote><div><br></div><div style>Neat, I like this conservative approach to vectorization.  It seems like if it's good enough for -Os it should be good enough for -O2.  I thought the main objections against vectorization at -O2 centered around code bloat and regressions of hot but short loops.  If these heuristics address those concerns and compile time doesn't suffer too much, it seems reasonable to enable at -O2.</div>
<div><br></div><div style>My poorly informed 2 cents. </div></div></div></div>