<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Wed, Apr 8, 2015 at 11:42 AM, Chandler Carruth <span dir="ltr"><<a href="mailto:chandlerc@gmail.com" target="_blank">chandlerc@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Before we go here, I think we should seriously ask whether we want to undo that restriction on shift left.<br>
<br>
I can see arguments both for and against it.<br>
<br>
Does GCC already do this optimization?</blockquote><div><br></div><div>I've not found any evidence that GCC optimizes on the assumption that the LHS of a signed left shift is not negative. </div></div></div></div>