<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><br><div><div>On Jul 11, 2013, at 5:35 AM, <a href="mailto:Andrea_DiBiagio@sn.scee.net">Andrea_DiBiagio@sn.scee.net</a> wrote:</div><blockquote type="cite"><div style="letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><blockquote type="cite"><br></blockquote><br>I considered this case, but I decided that it was probably best to not<span class="Apple-converted-space"> </span><br>introduce unnecessary complexity into a target specific optimization when,<span class="Apple-converted-space"> </span><br>as Duncan says, this case is already covered by the IR optimizer.<br><br></div></blockquote><div dir="auto"><br></div><div dir="auto">These vectors with these constants can be generated during legalization.  But it’s not a big deal and we can do without it.  </div><div dir="auto"><br></div><br><blockquote type="cite"><div style="letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><br>The behavior of shifts by amount larger than the element size is defined<span class="Apple-converted-space"> </span><br>for x86 SSE2/AVX2.<br></div></blockquote><div><br></div><div><br></div><div>Yes, but we are looking at the semantics of the llvm SelectionDAG, and we want to lower it to x86.  :)</div><div><br></div><div>In any case, this is correct and I don’t see any reason not to commit the patch as is. </div><div><br></div><blockquote type="cite"><div style="letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">In my opinion this is not a missed opportunity since we don't know about<span class="Apple-converted-space"> </span><br>the sign bit of variable %InVec and therefore it is not safe to fold the<span class="Apple-converted-space"> </span><br>arithmetic shift into a vector of all 0s.<br><br></div></blockquote><div><br></div>Yes, you are correct. I missed the fact that this is an *arithmetic* shift. </div><br><div>Thanks,</div><div>Nadav</div></body></html>