<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;">Hi Adam,<div><br></div><div>This LGTM with two minors comments:</div><div><br></div><div><div>+define <8 x i16> @foo(<8 x i16> %a, <8 x i16> %b) #0 {</div><div>+; CHECK: .short<span class="Apple-tab-span" style="white-space:pre"> </span>      32</div><div><br></div><div>- Add a check LABEL here.</div><div>- Remove the #0, it seems you do not have any related attribute (same for bar).</div><div><br></div><div>If you still do not have commit access, sent the updated patch, I’ll commit for you!</div><div><br></div><div>Thanks,</div><div apple-content-edited="true">
<div style="color: rgb(0, 0, 0); font-family: Helvetica;  font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">-Quentin</div>

</div>
<br><div><div>On Feb 21, 2014, at 3:12 PM, Adam Nemet <<a href="mailto:anemet@apple.com">anemet@apple.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 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>On Feb 20, 2014, at 8:13 PM, Adam Nemet <<a href="mailto:anemet@apple.com">anemet@apple.com</a>> wrote:<br><br><blockquote type="cite">On Feb 18, 2014, at 4:44 PM, Adam Nemet <<a href="mailto:anemet@apple.com">anemet@apple.com</a>> wrote:<br><br><blockquote type="cite">This change is motivated by the benchmark in SingleSource/Benchmarks/Misc/lowercase.c.<br><br>          pcmpgtw %xmm3, %xmm2<br>          pand    %xmm7, %xmm2      // xmm7 is <1, 1, 1, 1, 1, 1, 1, 1><br>          psllw   $5, %xmm2<br><br>PCMP* sets its result to all ones or zeros so we can AND with the shifted mask rather than masking and shifting separately.<br><br>The patch adds this transformation to the DAGCombiner:<br><br>(shl (and (setcc:i8v16 ...) N01C) N1C) -> (and (setcc:i8v16 ...) N01C<<N1C)<br><br>This is a similar transformation that is already done for sign-extending the result of setcc for targets where boolean values are either zero or all-ones.<br><br>If the patch looks good, please apply.<br></blockquote><br>Quentin pointed out offline that a BuildVector is not necessarily constant.  This new version adds some extra checks to guarantee that.  Retested on x86_64-apple-darwin.<br></blockquote><br>Even BuildVectors that return true in isConstant can have undef elements. In this case constant-folding returns NULL so my new assert triggers.  Function bar in the test case is an example.<br><br>In this new version, I bail if constant-folding failed, i.e. when the const vector has an undef element.<br><br>Retested as before.<br><br>Adam<br><br><span><redundant-psll-4.patch></span></div></blockquote></div><br></div></body></html>