<div dir="ltr">I think the real question is -Oz. My understanding is that the SLP vectorizer should always make code smaller.<div><br></div><div>I don't think matching the loop vectorizer is important. I think the expectations of -O flags are not about the vectorization of code, but about the trade-offs between user experiences. While I've mentioned it on other threads:</div>
<div><br></div><div>O1: quickly optimize what you can</div><div>O2: our general ideal tradeoff between compile time and optimizations</div><div>O3: (i wish we didn't have it) burn more compile time and/or binary size to try and dig out some optimizations.</div>
<div>Os: optimize, but try to make the resulting code smaller where possible.</div><div>Oz: do anything necessary to make code smaller, even things that hurt performance</div><div><br></div><div>My impression was that SLP vectorization made sense at least for 2, 3, s, and z. If the compile time is low enough, maybe for O1 as well.</div>
<div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Apr 28, 2014 at 1:09 PM, Chad Rosier <span dir="ltr"><<a href="mailto:mcrosier@codeaurora.org" target="_blank">mcrosier@codeaurora.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">One argument for matching the behavior of the loop vectorizer is that it's<br>
probably what the user expects.<br>
<div class="HOEnZb"><div class="h5"><br>
> Hi Chandler,<br>
> The discussion was in the PR as well as via IRC.  I'm certainly not<br>
> against continuing the discussion.<br>
><br>
> I believe everyone strongly agrees this shouldn't be on at -O0;  Let me<br>
> know if you feel otherwise.  The decision to match the behavior of the<br>
> loop vectorizer at -O1 and -Oz was mostly arbitrary and I have no strong<br>
> feelings either way.<br>
><br>
> What are your thoughts?<br>
><br>
>  Chad<br>
><br>
>> On Mon, Apr 28, 2014 at 12:30 PM, Chad Rosier<br>
>> <<a href="mailto:mcrosier@codeaurora.org">mcrosier@codeaurora.org</a>>wrote:<br>
>><br>
>>> -O1, and -Oz<br>
>><br>
>><br>
>> Wait, why? Based on what discussion?<br>
>><br>
>> This is a pretty significant change, I'd like to understand why it was<br>
>> made.<br>
>><br>
><br>
><br>
> --<br>
> Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,<br>
> hosted by The Linux Foundation<br>
><br>
<br>
<br>
--<br>
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,<br>
hosted by The Linux Foundation<br>
<br>
</div></div></blockquote></div><br></div>